Closed 0xd5dc closed 2 years ago
I think this change makes sense, I didn't know filepaths could be like that on windows.
But for me the new tests are failing:
FAIL: test_compare_output (adapter.comm.tests.test_tools.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/unittest/mock.py", line 1325, in patched
return func(*newargs, **newkeywargs)
File "/Users/eneill/repos/repo_copies/Adapter/adapter/comm/tests/test_tools.py", line 157, in test_compare_output
self.assertEqual(
AssertionError: '/media/Abc/\\/First_Level/Second_Level/Third_Level/input' != '/media/Abc/First_Level/Second_Level/Third_Level/input'
- /media/Abc/\/First_Level/Second_Level/Third_Level/input
? --
+ /media/Abc/First_Level/Second_Level/Third_Level/input
======================================================================
FAIL: test_compare_output2 (adapter.comm.tests.test_tools.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/unittest/mock.py", line 1325, in patched
return func(*newargs, **newkeywargs)
File "/Users/eneill/repos/repo_copies/Adapter/adapter/comm/tests/test_tools.py", line 180, in test_compare_output2
self.assertEqual(
AssertionError: '/Volumes/Abc/\\/First_Level/Second_Level/Third_Level/input' != '/Volumes/Abc/First_Level/Second_Level/Third_Level/input'
- /Volumes/Abc/\/First_Level/Second_Level/Third_Level/input
? --
+ /Volumes/Abc/First_Level/Second_Level/Third_Level/input
I think this change makes sense, I didn't know filepaths could be like that on windows.
But for me the new tests are failing:
FAIL: test_compare_output (adapter.comm.tests.test_tools.Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/unittest/mock.py", line 1325, in patched return func(*newargs, **newkeywargs) File "/Users/eneill/repos/repo_copies/Adapter/adapter/comm/tests/test_tools.py", line 157, in test_compare_output self.assertEqual( AssertionError: '/media/Abc/\\/First_Level/Second_Level/Third_Level/input' != '/media/Abc/First_Level/Second_Level/Third_Level/input' - /media/Abc/\/First_Level/Second_Level/Third_Level/input ? -- + /media/Abc/First_Level/Second_Level/Third_Level/input ====================================================================== FAIL: test_compare_output2 (adapter.comm.tests.test_tools.Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/unittest/mock.py", line 1325, in patched return func(*newargs, **newkeywargs) File "/Users/eneill/repos/repo_copies/Adapter/adapter/comm/tests/test_tools.py", line 180, in test_compare_output2 self.assertEqual( AssertionError: '/Volumes/Abc/\\/First_Level/Second_Level/Third_Level/input' != '/Volumes/Abc/First_Level/Second_Level/Third_Level/input' - /Volumes/Abc/\/First_Level/Second_Level/Third_Level/input ? -- + /Volumes/Abc/First_Level/Second_Level/Third_Level/input
The issue caused by os.path.join function running on Posix system. In your example, X:/First_Level/Second_Level/Third_Level/input
generated under macOS.
this fix allows adapter handle both X:folder\file and X:\folder\file Windows path format.