Skip to content

Commit cb72eb9

Browse files
authored
Allow test_exec_with_literal_default to pass when runtime isn't installed. (#56)
1 parent c46da6c commit cb72eb9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/test_commands.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import pytest
22
import secrets
33
from manage import commands
4+
from manage.exceptions import NoInstallsError
45

56

67
def test_pymanager_help_command(assert_log):
@@ -46,4 +47,11 @@ def test_help_with_error_command(assert_log):
4647

4748
def test_exec_with_literal_default():
4849
cmd = commands.load_default_config(None)
49-
assert cmd.get_install_to_run("default", None)
50+
try:
51+
assert cmd.get_install_to_run("default", None)
52+
except ValueError:
53+
# This is our failure case!
54+
raise
55+
except NoInstallsError:
56+
# This is also an okay result, if the default runtime isn't installed
57+
pass

0 commit comments

Comments
 (0)