8000 test_node_app__make_empty__base_dir_is_None is corrected · postgrespro/testgres@dffde2c · GitHub
[go: up one dir, main page]

Skip to content

Commit dffde2c

Browse files
test_node_app__make_empty__base_dir_is_None is corrected
1 parent b5b0d2b commit dffde2c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/test_testgres_common.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,10 +1631,14 @@ def test_node_app__make_empty__base_dir_is_None(self, node_svc: PostgresNodeServ
16311631
with __class__.tag_rmdirs_protector(os_ops):
16321632
node_app = NodeApp(test_path=tmp_dir, os_ops=os_ops)
16331633

1634-
with pytest.raises(expected_exception=ValueError) as x:
1634+
with pytest.raises(expected_exception=BaseException) as x:
16351635
node_app.make_empty(base_dir=None)
16361636

1637-
assert str(x.value) == "Argument 'base_dir' is not defined."
1637+
if type(x.value) == AssertionError: # noqa: E721
1638+
pass
1639+
else:
1640+
assert type(x.value) == ValueError # noqa: E721
1641+
assert str(x.value) == "Argument 'base_dir' is not defined."
16381642

16391643
# -----------
16401644
logging.info("temp directory [{}] is deleting".format(tmp_dir))

0 commit comments

Comments
 (0)
0