diff --git a/tests/isatab/test_isatab.py b/tests/isatab/test_isatab.py index 25eee0d4..9936febe 100644 --- a/tests/isatab/test_isatab.py +++ b/tests/isatab/test_isatab.py @@ -440,7 +440,7 @@ def test_isatab_dump_source_sample_char_quant(self): s.process_sequence = [sample_collection_process] s.samples.append(sample1) i.studies = [s] - actual = isatab.dumps(i) + actual = replace_windows_newlines(isatab.dumps(i)) expected = """Source Name\tMaterial Type\tCharacteristics[organism]\tTerm Source REF\tTerm Accession Number\tCharacteristics[body weight]\tUnit\tTerm Source REF\tTerm Accession Number\tProtocol REF\tParameter Value[vessel]\tTerm Source REF\tTerm Accession Number\tParameter Value[storage temperature]\tUnit\tTerm Source REF\tTerm Accession Number\tSample Name\tCharacteristics[organism part]\tTerm Source REF\tTerm Accession Number\tCharacteristics[specimen mass]\tUnit\tTerm Source REF\tTerm Accession Number source1\tspecimen\tHuman\tNCBITAXON\thttp://purl.bioontology.org/ontology/STY/T016\t72\tkilogram\tUO\thttp://purl.obolibrary.org/obo/UO_0000009\tsample collection\teppendorf tube\tOBI\tpurl.org\t-20\tdegree Celsius\tUO\thttp://purl.obolibrary.org/obo/UO_0000027\tsample1\tliver\tUBERON\thttp://purl.obolibrary.org/obo/UBERON_0002107\t450.5\tmilligram\tUO\thttp://purl.obolibrary.org/obo/UO_0000022""" self.assertIn(expected, actual) diff --git a/tests/validators/test_validate_test_data.py b/tests/validators/test_validate_test_data.py index 4d8c1a4e..35fda568 100644 --- a/tests/validators/test_validate_test_data.py +++ b/tests/validators/test_validate_test_data.py @@ -305,7 +305,7 @@ class TestIsaJsonCreateTestData(unittest.TestCase): def setUp(self): self._reporting_level = logging.ERROR - self.v2_create_schemas_path = pathlib.PurePosixPath( + self.v2_create_schemas_path = pathlib.Path( pathlib.Path(__file__).parents[0], '..', '..', 'isatools', 'resources', 'schemas', 'isa_model_version_2_0_schemas', 'create') @@ -315,7 +315,7 @@ def test_validate_testdata_sampleassayplan_json(self): with open(os.path.join(self.v2_create_schemas_path, 'sample_assay_plan_schema.json')) as fp: sample_assay_plan_schema = json.load(fp) - res_path = pathlib.PurePosixPath("file://", self.v2_create_schemas_path, + res_path = pathlib.Path("file://", self.v2_create_schemas_path, 'sample_assay_plan_schema.json').as_uri() resolver = RefResolver(res_path, sample_assay_plan_schema) validator = Draft4Validator(sample_assay_plan_schema, @@ -342,7 +342,7 @@ def test_validate_testdata_treatment_sequence_json(self): with open(os.path.join(self.v2_create_schemas_path, 'treatment_sequence_schema.json')) as fp: treatment_sequence_schema = json.load(fp) - res_path = pathlib.PurePosixPath("file://", self.v2_create_schemas_path, + res_path = pathlib.Path("file://", self.v2_create_schemas_path, 'treatment_sequence_schema.json').as_uri() resolver = RefResolver(res_path, treatment_sequence_schema) validator = Draft4Validator(treatment_sequence_schema,