Skip to content

Commit 8aa8b4f

Browse files
committed
review change part2
1 parent 008af92 commit 8aa8b4f

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

tests/embedding/test_app.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,15 +275,16 @@ def test_building_gallery(pytestconfig, run_subprocess, rootdir):
275275

276276
embedded_gallery_py = os.path.join(rootdir, "tests", "scripts", "build_gallery_test.py")
277277

278-
stdout, _ = run_subprocess([sys.executable, embedded_gallery_py, version, "False"])
279-
stdout = stdout.decode()
278+
_, stderr = run_subprocess([sys.executable, embedded_gallery_py, version, "False"], None, False)
279+
stderr = stderr.decode()
280+
280281
# Assert Exception
281-
assert "Cannot have more than one embedded mechanical instance" in stdout
282+
assert "Cannot have more than one embedded mechanical instance" in stderr
282283

283284
stdout, _ = run_subprocess([sys.executable, embedded_gallery_py, version, "True"])
284285
stdout = stdout.decode()
285286

286-
# Assert stdout afte launching multiple app
287+
# Assert stdout after launching multiple instances
287288
assert "Multiple App launched with building gallery flag on" in stdout
288289

289290

tests/scripts/build_gallery_test.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,4 @@ def launch_app(version):
4747
print("Multiple App launched with building gallery flag on")
4848

4949
elif build_gallery_flag == "False":
50-
try:
51-
app2 = launch_app(version)
52-
except Exception as e:
53-
print(e)
50+
app2 = launch_app(version)

0 commit comments

Comments
 (0)