Skip to content

Commit b98b465

Browse files
committed
re
Signed-off-by: hkkim <[email protected]>
1 parent 6a7f376 commit b98b465

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

tests/test_tox.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,12 @@ def run_command(command):
1010

1111
def test_run():
1212
run_command("rm -rf test_scan test_scan2 test_scan3")
13-
os.makedirs("test_scan")
13+
os.makedirs("test_scan", exist_ok=True)
1414
scan_success, _ = run_command("fosslight_source -p tests/test_files -j -m -o test_scan")
1515
scan_exclude_success, _ = run_command("fosslight_source -p tests -e test_files/test cli_test.py -j -m -o test_scan2")
1616

17-
scan_files = os.listdir("test_scan")
18-
scan2_files = os.listdir('test_scan2')
19-
2017
assert scan_success is True, "Test Run: Scan command failed"
2118
assert scan_exclude_success is True, "Test Run: Exclude command failed"
22-
assert len(scan_files) > 0, "Test Run: No scan files created in test_scan directory"
23-
assert len(scan2_files) > 0, "Test Run: No scan files created in test_scan2 directory"
2419

2520

2621
def test_help_command():

tox.ini

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ allowlist_externals =
1313
pytest
1414
setenv =
1515
PYTHONPATH=.
16+
skip_install = true
1617

1718
[flake8]
1819
max-line-length = 130
@@ -26,18 +27,17 @@ deps =
2627
-r{toxinidir}/requirements-dev.txt
2728

2829
commands =
29-
pytest tests/test_tox.py::test_run
30+
pytest tests/test_tox.py::test_run --maxfail=1 --disable-warnings --cache-clear
3031

3132
[testenv:release]
3233
deps =
3334
-r{toxinidir}/requirements-dev.txt
3435

3536
commands =
36-
pytest -n 4 tests/test_tox.py::test_help_command
37-
pytest -n 4 tests/test_tox.py::test_scan_command
38-
pytest -n 4 tests/test_tox.py::test_exclude_command
39-
pytest -n 4 tests/test_tox.py::test_json_command
40-
pytest -n 4 tests/test_tox.py::test_ls_test_scan3_command
37+
pytest tests/test_tox.py::test_help_command tests/test_tox.py::test_scan_command \
38+
tests/test_tox.py::test_exclude_command tests/test_tox.py::test_json_command \
39+
tests/test_tox.py::test_ls_test_scan3_command \
40+
--maxfail=1 --disable-warnings
4141

4242
python tests/cli_test.py
4343
pytest -v --flake8

0 commit comments

Comments
 (0)