MCPcopy Create free account
hub / github.com/NVIDIA/SOL-ExecBench / TestExtLoad

Class TestExtLoad

tests/sol_execbench/driver/test_build_ext.py:264–283  ·  view source on GitHub ↗

Tests for ext.load call arguments.

Source from the content-addressed store, hash-verified

262
263
264class TestExtLoad:
265 """Tests for ext.load call arguments."""
266
267 def test_load_called_with_correct_name(self, tmp_path):
268 (tmp_path / "k.cu").write_text("")
269 (tmp_path / "benchmark_kernel.so").write_bytes(b"fake")
270 mock = _exec_build_ext(tmp_path)
271 assert mock.load.call_args.kwargs["name"] == "benchmark_kernel"
272
273 def test_build_directory_is_cwd(self, tmp_path):
274 (tmp_path / "k.cu").write_text("")
275 (tmp_path / "benchmark_kernel.so").write_bytes(b"fake")
276 mock = _exec_build_ext(tmp_path)
277 assert mock.load.call_args.kwargs["build_directory"] == str(tmp_path)
278
279 def test_verbose_enabled(self, tmp_path):
280 (tmp_path / "k.cu").write_text("")
281 (tmp_path / "benchmark_kernel.so").write_bytes(b"fake")
282 mock = _exec_build_ext(tmp_path)
283 assert mock.load.call_args.kwargs["verbose"] is True

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected