@@ -256,19 +256,19 @@ def test_compiler_normalized(self):
256
256
class TestCompiler :
257
257
"""Tests the compiler class of homcc."""
258
258
259
- def test_from_str (self ):
260
- assert isinstance (Compiler .from_str ( "gcc" ), Gcc )
261
- assert isinstance (Compiler .from_str ( "gcc-11" ), Gcc )
262
- assert isinstance (Compiler .from_str ( "g++" ), Gcc )
263
- assert isinstance (Compiler .from_str ( "g++-11" ), Gcc )
264
- assert isinstance (Compiler .from_str ( "/usr/lib/ccache/gcc-11" ), Gcc )
259
+ def test_from_arguments (self ):
260
+ assert isinstance (Compiler .from_arguments ( Arguments ( "gcc" , []) ), Gcc )
261
+ assert isinstance (Compiler .from_arguments ( Arguments ( "gcc-11" , []) ), Gcc )
262
+ assert isinstance (Compiler .from_arguments ( Arguments ( "g++" , []) ), Gcc )
263
+ assert isinstance (Compiler .from_arguments ( Arguments ( "g++-11" , []) ), Gcc )
264
+ assert isinstance (Compiler .from_arguments ( Arguments ( "/usr/lib/ccache/gcc-11" , []) ), Gcc )
265
265
266
- assert isinstance (Compiler .from_str ( "clang++" ), Clang )
267
- assert isinstance (Compiler .from_str ( "clang++-11" ), Clang )
268
- assert isinstance (Compiler .from_str ( "/usr/lib/ccache/clang-14" ), Clang )
266
+ assert isinstance (Compiler .from_arguments ( Arguments ( "clang++" , []) ), Clang )
267
+ assert isinstance (Compiler .from_arguments ( Arguments ( "clang++-11" , []) ), Clang )
268
+ assert isinstance (Compiler .from_arguments ( Arguments ( "/usr/lib/ccache/clang-14" , []) ), Clang )
269
269
270
270
with pytest .raises (UnsupportedCompilerError ):
271
- Compiler .from_str ( "unknown++" )
271
+ Compiler .from_arguments ( Arguments ( "unknown++" , []) )
272
272
273
273
274
274
class TestGcc :
0 commit comments