Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit89c8625

Browse files
A problem with tests.test_simple.TestgresTests.test_simple_with_bin_dir is fixed
testgres generates the exception testgres.exceptions.ExecUtilException, but test traps the exception FileNotFoundError.Error message is: Utility exited with non-zero code. Error: `bash: line 1: wrong/path/postgres: No such file or directory` Command: ('wrong/path/postgres --version',)
1 parent6fe28a5 commit89c8625

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

‎tests/test_simple.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,13 +1244,19 @@ def test_simple_with_bin_dir(self):
12441244
correct_bin_dir=app.make_simple(base_dir=node.base_dir,bin_dir=bin_dir)
12451245
correct_bin_dir.slow_start()
12461246
correct_bin_dir.safe_psql("SELECT 1;")
1247+
correct_bin_dir.stop()
1248+
1249+
whileTrue:
1250+
try:
1251+
app.make_simple(base_dir=node.base_dir,bin_dir="wrong/path")
1252+
exceptFileNotFoundError:
1253+
break# Expected error
1254+
exceptExecUtilException:
1255+
break# Expected error
12471256

1248-
try:
1249-
wrong_bin_dir=app.make_empty(base_dir=node.base_dir,bin_dir="wrong/path")
1250-
wrong_bin_dir.slow_start()
12511257
raiseRuntimeError("Error was expected.")# We should not reach this
1252-
exceptFileNotFoundError:
1253-
pass# Expected error
1258+
1259+
return
12541260

12551261
deftest_set_auto_conf(self):
12561262
# elements contain [property id, value, storage value]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp