Rename tests to run to ALL_TESTS

pull/1986/head
Simone 1 year ago
parent 5681540708
commit ace672e27d
  1. 6
      tests/e2e/detectors/test_detectors.py

@ -56,7 +56,7 @@ def id_test(test_item: Test):
return f"{test_item.detector.__name__}-{test_item.solc_ver}-{test_item.test_file}" return f"{test_item.detector.__name__}-{test_item.solc_ver}-{test_item.test_file}"
ALL_TEST_OBJECTS = [ ALL_TESTS = [
Test( Test(
all_detectors.UninitializedFunctionPtrsConstructor, all_detectors.UninitializedFunctionPtrsConstructor,
"uninitialized_function_ptr_constructor.sol", "uninitialized_function_ptr_constructor.sol",
@ -1656,7 +1656,7 @@ GENERIC_PATH = "/GENERIC_PATH"
TEST_DATA_DIR = Path(__file__).resolve().parent / "test_data" TEST_DATA_DIR = Path(__file__).resolve().parent / "test_data"
# pylint: disable=too-many-locals # pylint: disable=too-many-locals
@pytest.mark.parametrize("test_item", ALL_TEST_OBJECTS, ids=id_test) @pytest.mark.parametrize("test_item", ALL_TESTS, ids=id_test)
def test_detector(test_item: Test, snapshot): def test_detector(test_item: Test, snapshot):
test_dir_path = Path( test_dir_path = Path(
TEST_DATA_DIR, TEST_DATA_DIR,
@ -1704,5 +1704,5 @@ if __name__ == "__main__":
"To generate the zip artifacts run\n\tpython tests/e2e/tests/test_detectors.py --compile" "To generate the zip artifacts run\n\tpython tests/e2e/tests/test_detectors.py --compile"
) )
elif sys.argv[1] == "--compile": elif sys.argv[1] == "--compile":
for next_test in ALL_TEST_OBJECTS: for next_test in ALL_TESTS:
_generate_compile(next_test, skip_existing=True) _generate_compile(next_test, skip_existing=True)

Loading…
Cancel
Save