fixed test call

This commit is contained in:
2023-12-07 22:12:56 +01:00
parent 529776bac6
commit 3ebe5bba7f
5 changed files with 4 additions and 4 deletions

View File

@@ -7,6 +7,6 @@ Dies ist die dritte Version von AutoPicture.
# Tests # Tests
```bash ```bash
python3.10 -m pytest --no-header -rfp --cov --cov-report html:tests/coverage --cov-report xml:tests/coverage/coverage.xml tests/ sh ./tests/start_tests.sh
``` ```

View File

@@ -1,3 +1,3 @@
[pytest] [pytest]
pythonpath = . pythonpath = tests
addopts = --ignore-glob=**/tests/** addopts = --ignore-glob=**/tests/**

1
tests/start_tests.sh Executable file
View File

@@ -0,0 +1 @@
python3.10 -m pytest --no-header -rfp --cov --cov-report html:tests/coverage --cov-report xml:tests/coverage/coverage.xml tests/

View File

@@ -14,7 +14,7 @@ class TestScanFolder(unittest.TestCase):
create_file(file='img_01.jpeg') create_file(file='img_01.jpeg')
files = scan_folder(TEST_FOLDER) files = scan_folder(TEST_FOLDER)
delete_folder() delete_folder()
assert len(files) == 1 assert len(files) == 1
def test_scan_empty_folder(self): def test_scan_empty_folder(self):
@@ -43,4 +43,3 @@ class TestScanFolder(unittest.TestCase):
delete_folder() delete_folder()
assert len(files) == 0 assert len(files) == 0