Closed kripnerl closed 8 months ago
Regressions test fail. Sorry, I have never used pathlib
and did not realize it does not behave like a standard string :/
ImportError: Failed to import test module: failed_imports
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
module = self._get_module_from_name(name)
File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
__import__(name)
File "/home/runner/work/omas/omas/omas/tests/failed_imports.py", line 45, in <module>
if not os.path.exists(os.environ.get('AWS_CONFIG_FILE', pathlib.Path.home() + '/.aws/config')):
TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'
Regressions test fail. Sorry, I have never used
pathlib
and did not realize it does not behave like a standard string :/ImportError: Failed to import test module: failed_imports Traceback (most recent call last): File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/loader.py", line 428, in _find_test_path module = self._get_module_from_name(name) File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name __import__(name) File "/home/runner/work/omas/omas/omas/tests/failed_imports.py", line 45, in <module> if not os.path.exists(os.environ.get('AWS_CONFIG_FILE', pathlib.Path.home() + '/.aws/config')): TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'
My bad - I was a bit confused by the suggestion :-). Hopefully, it's fixed now.
Btw pathlib
is a very handy library - makes life much simpler!
Changes:
pathlib.Path.home()
inseted ofos.environ["HOME"]
to be compatible with Windows.Note:
Nevertheless, Windows compatibility was not tested since I do not have access to Windows at the moment.