def test_sanitize_max_jobs_none(): assert DEFAULT_MAX_JOBS == _sanitize_max_jobs(None)
def test_sanitize_max_jobs_too_large(): assert _ABSOLUTE_MAX_JOBS == _sanitize_max_jobs(_ABSOLUTE_MAX_JOBS) assert _ABSOLUTE_MAX_JOBS == _sanitize_max_jobs(_ABSOLUTE_MAX_JOBS + 1) assert _ABSOLUTE_MAX_JOBS == _sanitize_max_jobs(_ABSOLUTE_MAX_JOBS + 5)
def test_sanitize_max_jobs_nominal(): assert 1 == _sanitize_max_jobs(1)
def test_sanitize_max_jobs_less_then_one(): assert DEFAULT_MAX_JOBS == _sanitize_max_jobs(0) assert DEFAULT_MAX_JOBS == _sanitize_max_jobs(-1) assert DEFAULT_MAX_JOBS == _sanitize_max_jobs(-5)
def test_sanitize_max_jobs_none(): # type: () -> None assert DEFAULT_MAX_JOBS == _sanitize_max_jobs(None)
def test_sanitize_max_jobs_nominal(): # type: () -> None assert 1 == _sanitize_max_jobs(1)