Skip to content

Commit 6ee8545

Browse files
committed
add test for get_compiler_none
1 parent 8773e7f commit 6ee8545

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

paths_cli/tests/compiling/test_root_compiler.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,16 @@ def test_get_compiler_nonexisting(foo_compiler):
149149
assert 'foo' in _COMPILERS
150150

151151

152+
def test_get_compiler_none():
153+
# if trying to get the None compiler, the same None compiler should
154+
# always be returned
155+
with patch.dict(COMPILER_LOC, {}):
156+
compiler1 = _get_compiler(None)
157+
assert compiler1.label is None
158+
compiler2 = _get_compiler(None)
159+
assert compiler1 is compiler2
160+
161+
152162
def test_get_compiler_nonstandard_name_multiple():
153163
# regression test based on real issue -- there was an error where
154164
# non-canonical names (e.g., names that involved hyphens instead of

0 commit comments

Comments
 (0)