mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Python: Copy Python extractor to codeql repo
This commit is contained in:
16
python/extractor/tests/buildtools/test_install.py
Normal file
16
python/extractor/tests/buildtools/test_install.py
Normal file
@@ -0,0 +1,16 @@
|
||||
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
|
||||
Reference in New Issue
Block a user