aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-04-22 16:43:11 +0200
committerWojtek Kosior <koszko@koszko.org>2022-04-25 13:19:02 +0200
commit4d8810538798aa815a459f298349a03fc6b3ea3f (patch)
tree913f7eb355cde988c621b16928349e3623fb19f1
parentbfd6005d0e1481e8a4df1f06c74e70a558199b71 (diff)
downloadhaketilo-hydrilla-4d8810538798aa815a459f298349a03fc6b3ea3f.tar.gz
haketilo-hydrilla-4d8810538798aa815a459f298349a03fc6b3ea3f.zip
use pyproject.toml for pytest configuration and move all tests to tests/ directory
this commit also fixes inclusion of sample source package's REUSE data in source dist (needed for automated tests)
-rw-r--r--.gitmodules2
-rw-r--r--MANIFEST.in4
-rw-r--r--pyproject.toml7
-rw-r--r--src/conftest.py0
-rw-r--r--tests/__init__.py (renamed from src/test/__init__.py)0
-rw-r--r--tests/config.json (renamed from src/test/config.json)0
m---------tests/source-package-example (renamed from src/test/source-package-example)0
-rw-r--r--tests/test_server.py (renamed from src/test/test_server.py)0
8 files changed, 11 insertions, 2 deletions
diff --git a/.gitmodules b/.gitmodules
index 6528d07..271d652 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -5,5 +5,5 @@
# Available under the terms of Creative Commons Zero v1.0 Universal.
[submodule "src/test/source-package-example"]
- path = src/test/source-package-example
+ path = tests/source-package-example
url = ../hydrilla-source-package-example/
diff --git a/MANIFEST.in b/MANIFEST.in
index 900e535..558e461 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -5,5 +5,7 @@
# Available under the terms of Creative Commons Zero v1.0 Universal.
include src/hydrilla/server/locales/*/LC_MESSAGES/hydrilla-messages.po
-include src/test/source-package-example/*
+include tests/source-package-example/*
+include tests/source-package-example/LICENSES/*
+include tests/source-package-example/.reuse/*
global-exclude .git .gitignore .gitmodules
diff --git a/pyproject.toml b/pyproject.toml
index 39e2823..b6f87c4 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -10,3 +10,10 @@ requires = ["setuptools>=45", "wheel", "setuptools_scm>=5.0", "babel"]
[tool.setuptools_scm]
write_to = "src/hydrilla/server/_version.py"
+
+[tool.pytest.ini_options]
+minversion = "6.0"
+addopts = "-ra -q"
+testpaths = [
+ "tests"
+]
diff --git a/src/conftest.py b/src/conftest.py
deleted file mode 100644
index e69de29..0000000
--- a/src/conftest.py
+++ /dev/null
diff --git a/src/test/__init__.py b/tests/__init__.py
index d382ead..d382ead 100644
--- a/src/test/__init__.py
+++ b/tests/__init__.py
diff --git a/src/test/config.json b/tests/config.json
index a75e2b1..a75e2b1 100644
--- a/src/test/config.json
+++ b/tests/config.json
diff --git a/src/test/source-package-example b/tests/source-package-example
-Subproject 92a4d31c659b2336e5e188877d1ce6bfad2fa31
+Subproject 92a4d31c659b2336e5e188877d1ce6bfad2fa31
diff --git a/src/test/test_server.py b/tests/test_server.py
index 1da5663..1da5663 100644
--- a/src/test/test_server.py
+++ b/tests/test_server.py