diff --git a/tests/.coveragerc b/.coveragerc similarity index 100% rename from tests/.coveragerc rename to .coveragerc diff --git a/README.md b/README.md index 97dbde6..1359056 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,6 @@ Dies ist die dritte Version von AutoPicture. # Tests ```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 ``` diff --git a/tests/pytest.ini b/pytest.ini similarity index 69% rename from tests/pytest.ini rename to pytest.ini index 11422c9..16d574f 100644 --- a/tests/pytest.ini +++ b/pytest.ini @@ -1,3 +1,3 @@ [pytest] -pythonpath = . +pythonpath = tests addopts = --ignore-glob=**/tests/** \ No newline at end of file diff --git a/tests/start_tests.sh b/tests/start_tests.sh new file mode 100755 index 0000000..7c64f2f --- /dev/null +++ b/tests/start_tests.sh @@ -0,0 +1 @@ +python3.10 -m pytest --no-header -rfp --cov --cov-report html:tests/coverage --cov-report xml:tests/coverage/coverage.xml tests/ \ No newline at end of file diff --git a/tests/test_scan_dir.py b/tests/test_scan_dir.py index fde5766..e24a512 100644 --- a/tests/test_scan_dir.py +++ b/tests/test_scan_dir.py @@ -14,7 +14,7 @@ class TestScanFolder(unittest.TestCase): create_file(file='img_01.jpeg') files = scan_folder(TEST_FOLDER) delete_folder() - + assert len(files) == 1 def test_scan_empty_folder(self): @@ -43,4 +43,3 @@ class TestScanFolder(unittest.TestCase): delete_folder() assert len(files) == 0 -