diff --git a/tests/data/scripts/create_test_data.py b/tests/data/scripts/create_test_data.py index c3efec24..bd52f1c7 100644 --- a/tests/data/scripts/create_test_data.py +++ b/tests/data/scripts/create_test_data.py @@ -28,26 +28,6 @@ def write_test_sample(reader: csv.reader, writer: csv.writer, property_test_case if has_prop: break -def get_test_sample(src_data: pd.DataFrame, property_test_cases: List[str]) -> pd.DataFrame: - # check that all test cases exist at least once in data set - assert len(src_data) > 0 - contains_test_cases = [] - for p in property_test_cases: - has_related_name = src_data['Property Name'].map(lambda x: True if p in str(x) else False) - contains_test_cases.append(np.any(has_related_name)) - assert np.all(contains_test_cases) - test_cases = src_data['Property Name'].str.contains('|'.join(property_test_cases), na=False) - return src_data[test_cases] - -def copy_test_data_sample( - test_data: pd.DataFrame, - test_data_file_path: pathlib.Path - ) -> pathlib.Path: - if not os.path.exists(test_data_file_path): - os.makedirs(os.path.dirname(test_data_file_path), exist_ok=True) - test_data.to_csv(test_data_file_path, index=False) - return test_data_file_path - def main(): # the first console argument is technically the python script so we skip that src_arg = sys.argv[1] @@ -56,8 +36,6 @@ def main(): src_path = curr_path / src_arg target_path = curr_path / target_arg - # src_data = get_and_clean_csv(src_path) - # test_data = get_test_sample(src_data, property_test_cases) csvfile = open(get_src_file_path(src_path), 'r') src_csv = csv.reader(csvfile)