diff --git a/tests/tool/test_Tool.py b/tests/tool/test_Tool.py index edc6bc19..8e8342b1 100644 --- a/tests/tool/test_Tool.py +++ b/tests/tool/test_Tool.py @@ -198,13 +198,19 @@ def test_find_input_files(self): expected = {"input1.csv": [expected_urls["url1"], expected_urls["url3"]], "input2.csv": None} self.assertEqual(2, len(result)) self.assertEqual(expected["input2.csv"], result["input2.csv"]) - self.assertTrue(os.path.abspath(expected_urls["url3"]) in os.path.abspath(result["input1.csv"][0]) or os.path.abspath(expected_urls["url1"]) in os.path.abspath(result["input1.csv"][0])) + self.assertTrue( + os.path.abspath(expected_urls["url3"]) in os.path.abspath(result["input1.csv"][0]) + or os.path.abspath(expected_urls["url1"]) in os.path.abspath(result["input1.csv"][0]) + ) resources.pop(0) resources.append( ProjectItemResource("Exporter", "file", "fifth", url="file:///" + url5, metadata={}, filterable=False) ) result = tool._find_input_files(resources) - expected = {"input2.csv": [expected_urls["url5"]], "input1.csv": [expected_urls["url3"]]} + expected = { + "input2.csv": [os.path.abspath(expected_urls["url5"])], + "input1.csv": [os.path.abspath(expected_urls["url3"])], + } self.assertEqual(expected, result) resources.append( ProjectItemResource("Exporter", "file", "sixth", url="file:///" + url6, metadata={}, filterable=False) @@ -212,8 +218,8 @@ def test_find_input_files(self): tool.specification().inputfiles = set(["input2.csv", os.path.join(self._temp_dir.name, "input3.csv")]) result = tool._find_input_files(resources) expected = { - os.path.join(self._temp_dir.name, "input3.csv"): [expected_urls["url6"]], - "input2.csv": [expected_urls["url5"]], + os.path.join(self._temp_dir.name, "input3.csv"): [os.path.abspath(expected_urls["url6"])], + "input2.csv": [os.path.abspath(expected_urls["url5"])], } self.assertEqual(expected, result)