Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
),
runtime=0,
timeout=False,
)
EXPECTED_PTR_COVERAGE_FAIL_RESULT = test_result(
setup_py_path=Path("unittest/setup.py"),
returncode=3,
output=(
f"The following files did not meet coverage requirements:\n tg{sep}tg.py: "
+ "22 < 99 - Missing: 39-59, 62-73, 121, 145-149, 153-225, 231-234, 238\n "
+ "TOTAL: 40 < 99 - Missing: \n"
),
runtime=0,
timeout=False,
)
EXPECTED_PTR_COVERAGE_MISSING_FILE_RESULT = test_result(
setup_py_path=Path("unittest/setup.py"),
returncode=3,
output=(
"fake_file.py has not reported any coverage. Does the file exist? "
+ "Does it get ran during tests? Remove from setup config."
),
runtime=0,
timeout=False,
)
EXPECTED_COVERAGE_RESULTS = [
test_result(
setup_py_path=Path("project69/setup.py"),
returncode=0,
output="Killed it",
runtime=4,
runtime=0,
timeout=False,
)
EXPECTED_PTR_COVERAGE_MISSING_FILE_RESULT = test_result(
setup_py_path=Path("unittest/setup.py"),
returncode=3,
output=(
"fake_file.py has not reported any coverage. Does the file exist? "
+ "Does it get ran during tests? Remove from setup config."
),
runtime=0,
timeout=False,
)
EXPECTED_COVERAGE_RESULTS = [
test_result(
setup_py_path=Path("project69/setup.py"),
returncode=0,
output="Killed it",
runtime=4,
timeout=False,
),
test_result(
setup_py_path=Path("project1/setup.py"),
returncode=2,
output="Timeout during Running project1/tests.py tests via coverage",
runtime=1,
timeout=True,
),
test_result(
setup_py_path=Path("project2/setup.py"),
returncode=1,
async def fake_test_steps_runner(
*args: Any, **kwargs: Any
) -> Tuple[Optional[ptr.test_result], int]:
return (None, TOTAL_REPORTER_TESTS)
# Disabled is set as we --run-disabled the run in CI
EXPECTED_TEST_PARAMS = {
"disabled": True,
"entry_point_module": "ptr",
"test_suite": "ptr_tests",
"test_suite_timeout": 120,
"required_coverage": {"ptr.py": 85, "TOTAL": 90},
"run_black": True,
"run_mypy": True,
"run_flake8": True,
"run_pylint": True,
"run_pyre": True,
}
EXPECTED_COVERAGE_FAIL_RESULT = test_result(
setup_py_path=Path("unittest/setup.py"),
returncode=3,
output=(
"The following files did not meet coverage requirements:\n"
+ f" unittest{sep}ptr.py: 69 < 99 - Missing: 70-72, 76-94, 98\n"
),
runtime=0,
timeout=False,
)
EXPECTED_PTR_COVERAGE_FAIL_RESULT = test_result(
setup_py_path=Path("unittest/setup.py"),
returncode=3,
output=(
f"The following files did not meet coverage requirements:\n tg{sep}tg.py: "
+ "22 < 99 - Missing: 39-59, 62-73, 121, 145-149, 153-225, 231-234, 238\n "
+ "TOTAL: 40 < 99 - Missing: \n"
"run_flake8": True,
"run_pylint": True,
"run_pyre": True,
}
EXPECTED_COVERAGE_FAIL_RESULT = test_result(
setup_py_path=Path("unittest/setup.py"),
returncode=3,
output=(
"The following files did not meet coverage requirements:\n"
+ f" unittest{sep}ptr.py: 69 < 99 - Missing: 70-72, 76-94, 98\n"
),
runtime=0,
timeout=False,
)
EXPECTED_PTR_COVERAGE_FAIL_RESULT = test_result(
setup_py_path=Path("unittest/setup.py"),
returncode=3,
output=(
f"The following files did not meet coverage requirements:\n tg{sep}tg.py: "
+ "22 < 99 - Missing: 39-59, 62-73, 121, 145-149, 153-225, 231-234, 238\n "
+ "TOTAL: 40 < 99 - Missing: \n"
),
runtime=0,
timeout=False,
)
EXPECTED_PTR_COVERAGE_MISSING_FILE_RESULT = test_result(
setup_py_path=Path("unittest/setup.py"),
returncode=3,
output=(
"fake_file.py has not reported any coverage. Does the file exist? "
+ "Does it get ran during tests? Remove from setup config."