diff --git a/tests/test_plugin.py b/tests/test_plugin.py index 2d6dbcb..674392d 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -103,6 +103,17 @@ def test_compile_args( with pytest.raises(subprocess.CalledProcessError): exec_fpath = plugin._compile(gname, compiler_args="--std c++14") + output = plugin._compile_and_run( + group_name=gname, + args=argparse.Namespace( + timeit=False, + profile=True, + profiler_args="", + compiler_args="--std c++14", + ), + ) + assert "errors detected in the compilation of" in output + def test_run( plugin: NVCCPlugin, @@ -213,6 +224,16 @@ def test_magic_cuda( check_profiler_output(capsys.readouterr().out) +def test_magic_cuda_bad_args( + capsys, + plugin: NVCCPlugin, + sample_cuda_code: str, +): + plugin.cuda("--this-is-an-unrecognized-argument", sample_cuda_code) + output = capsys.readouterr().out + assert output.startswith("usage: ") + + def test_magic_cuda_group_save(plugin: NVCCPlugin, sample_cuda_code: str): gname = "test_save_source" sname = "sample.cu"