NodeApp::make_empty has a problem with base_dir = None
Closed this issue · 1 comments
dmitry-lipetsk commented
Lines 2377 to 2382 in d6be913
NodeApp.make_empty fails when base_dir is None.
Exception has occurred: TypeError
join() argument must be str, bytes, or os.PathLike object, not 'NoneType'
File "/home/linuxbrew/.linuxbrew/opt/python@3.13/lib/python3.13/posixpath.py", line 82, in join
b = os.fspath(b)
TypeError: expected str, bytes or os.PathLike object, not NoneType
During handling of the above exception, another exception occurred:
File "/home/dima/MY/GitHub2/testgres/master/work02/testgres/operations/local_ops.py", line 257, in build_path
return os.path.join(a, *parts)
~~~~~~~~~~~~^^^^^^^^^^^
File "/home/dima/MY/GitHub2/testgres/master/work02/testgres/node_app.py", line 66, in make_empty
real_base_dir = self._os_ops.build_path(self._test_path, base_dir)
File "/home/dima/MY/GitHub2/testgres/master/work02/testgres/node_app.py", line 95, in make_simple
node = self.make_empty(
File "/home/dima/MY/GitHub2/testgres/master/work02/tests/test_testgres_common.py", line 1599, in test_node_app__make_simple__checksum
with app.make_simple(checksum=False):
dmitry-lipetsk commented
Attention
By default NodeApp uses CWD as (root) test path:
Line 2373 in 69f8d49
If you call NodeApp.make_empty (or NodeApp.male_simple) with empty base_dir (""), testgres will delete your current directory:
Lines 2382 to 2383 in 69f8d49
CWD may be a path to your a copy of testgres project or your application.