From d3dfc276f3685ea86bfe83d2a678c34b0f714af0 Mon Sep 17 00:00:00 2001 From: Brian Worth Date: Mon, 29 Jan 2024 16:34:59 -0500 Subject: [PATCH] prune back --- .../example_weyland_yutani_parser_test.py | 11 +---------- .../roche_cedex_bioht_parser_test.py | 4 ---- tests/parsers/test_utils.py | 2 +- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/tests/parsers/example_weyland_yutani/example_weyland_yutani_parser_test.py b/tests/parsers/example_weyland_yutani/example_weyland_yutani_parser_test.py index 85777d348..39632f494 100644 --- a/tests/parsers/example_weyland_yutani/example_weyland_yutani_parser_test.py +++ b/tests/parsers/example_weyland_yutani/example_weyland_yutani_parser_test.py @@ -2,10 +2,7 @@ from allotropy.parser_factory import Vendor from tests.parsers.test_utils import ( - CALCULATED_DATA_IDENTIFIER, - DATA_SOURCE_IDENTIFIER, from_file, - MEASUREMENT_IDENTIFIER, validate_contents, validate_schema, ) @@ -19,12 +16,6 @@ TESTDATA = "tests/parsers/example_weyland_yutani/testdata" VENDOR_TYPE = Vendor.EXAMPLE_WEYLAND_YUTANI -IDENTIFIERS_TO_EXCLUDE = [ - CALCULATED_DATA_IDENTIFIER, - DATA_SOURCE_IDENTIFIER, - MEASUREMENT_IDENTIFIER, -] - @pytest.mark.parametrize("filestem", valid_files) def test_parse_weyland_yutani_to_asm(filestem: str) -> None: @@ -32,4 +23,4 @@ def test_parse_weyland_yutani_to_asm(filestem: str) -> None: expected_filepath = f"{TESTDATA}/{filestem}.json" allotrope_dict = from_file(test_filepath, VENDOR_TYPE) validate_schema(allotrope_dict, SCHEMA) - validate_contents(allotrope_dict, expected_filepath, IDENTIFIERS_TO_EXCLUDE) + validate_contents(allotrope_dict, expected_filepath) diff --git a/tests/parsers/roche_cedex_bioht/roche_cedex_bioht_parser_test.py b/tests/parsers/roche_cedex_bioht/roche_cedex_bioht_parser_test.py index f50010bcd..5577a80b1 100644 --- a/tests/parsers/roche_cedex_bioht/roche_cedex_bioht_parser_test.py +++ b/tests/parsers/roche_cedex_bioht/roche_cedex_bioht_parser_test.py @@ -7,8 +7,6 @@ from allotropy.parsers.utils.timestamp_parser import TimestampParser from tests.parsers.roche_cedex_bioht.roche_cedex_bioht_data import get_data, get_model from tests.parsers.test_utils import ( - CALCULATED_DATA_IDENTIFIER, - DATA_SOURCE_IDENTIFIER, from_file, MEASUREMENT_IDENTIFIER, validate_contents, @@ -26,8 +24,6 @@ SCHEMA_FILE = "cell-culture-analyzer/BENCHLING/2023/09/cell-culture-analyzer.json" IDENTIFIERS_TO_EXCLUDE = [ - CALCULATED_DATA_IDENTIFIER, - DATA_SOURCE_IDENTIFIER, MEASUREMENT_IDENTIFIER, ] diff --git a/tests/parsers/test_utils.py b/tests/parsers/test_utils.py index 7f2898d88..1711f9132 100644 --- a/tests/parsers/test_utils.py +++ b/tests/parsers/test_utils.py @@ -74,7 +74,7 @@ def validate_schema(allotrope_dict: DictType, schema_relative_path: str) -> None def validate_contents( allotrope_dict: DictType, expected_file: str, - identifiers_to_exclude: list[str], + identifiers_to_exclude: Optional[list[str]] = None, ) -> None: """Use the newly created allotrope_dict to validate the contents inside expected_file.""" with open(expected_file) as f: