diff --git a/tests/conftest.py b/tests/conftest.py index ae68f0c..0b037af 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -51,7 +51,7 @@ def _get_schemas_v1(name): schema_files = list((test_dir / name).glob("*.json")) assert len(schema_files) > 0, f"No schema files found in {test_dir / name}" schemas = [] - + for file in schema_files: try: schemas.append({"name": file.stem, "schema": json.loads(file.read_text())}) diff --git a/tests/test_v1.py b/tests/test_v1.py index 7d04cbd..76eb6fa 100644 --- a/tests/test_v1.py +++ b/tests/test_v1.py @@ -11,9 +11,9 @@ def test_validate_df_v1_invalid(bad_schema_v1): def test_schema_objects(good_schema_v1: dict): from dfschema.core.core import DfSchema - + S = DfSchema.from_dict(good_schema_v1["schema"]) - if good_schema_v1['name'] == 'sales_certainty_inference': + if good_schema_v1["name"] == "sales_certainty_inference": new = S.dict() - model_col = [c for c in new['columns'] if c['name'] == 'model'][0] - assert model_col.get('categorical', {}).get('mode') == 'exact_set' + model_col = [c for c in new["columns"] if c["name"] == "model"][0] + assert model_col.get("categorical", {}).get("mode") == "exact_set"