mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
17 lines
494 B
Python
17 lines
494 B
Python
import pytest
|
|
|
|
import buildtools.install
|
|
from tests.buildtools.helper import in_fresh_temp_dir
|
|
|
|
def test_basic(monkeypatch, mocker):
|
|
mocker.patch('subprocess.call')
|
|
mocker.patch('subprocess.check_call')
|
|
|
|
with in_fresh_temp_dir() as path:
|
|
monkeypatch.setenv('LGTM_WORKSPACE', path)
|
|
monkeypatch.setenv('SEMMLE_DIST', '<none>')
|
|
|
|
with pytest.raises(SystemExit) as exc_info:
|
|
buildtools.install.main(3, '.', [])
|
|
assert exc_info.value.code == 0
|