Browse Source

moved test -> tests

Dimitri Korsch 3 years ago
parent
commit
922ea8fd3d
4 changed files with 5 additions and 5 deletions
  1. 2 2
      Makefile
  2. 0 0
      tests/__init__.py
  3. 1 1
      tests/base.py
  4. 2 2
      tests/test_database.py

+ 2 - 2
Makefile

@@ -8,10 +8,10 @@ install:
 	@echo "INSTALL MISSING!"
 
 run_tests:
-	python -m unittest discover test/
+	python -m unittest discover tests/
 
 run_coverage:
-	@coverage run -m unittest discover test/
+	@coverage run -m unittest discover tests/
 	coverage html
 	coverage report -m
 

+ 0 - 0
test/__init__.py → tests/__init__.py


+ 1 - 1
test/base.py → tests/base.py

@@ -13,7 +13,7 @@ from pycs.database.LabelProvider import LabelProvider
 server = None
 
 class BaseTestCase(unittest.TestCase):
-    def setUp(self, discovery: bool = True):
+    def setUp(self, discovery: bool = False):
         global server
         app.config["TESTING"] = True
         self.projects_dir = app.config["TEST_PROJECTS_DIR"] = "test_projects"

+ 2 - 2
test/test_database.py → tests/test_database.py

@@ -8,12 +8,12 @@ from pycs.database.Model import Model
 from pycs.database.Project import Project
 from pycs.database.Result import Result
 
-from test.base import BaseTestCase
+from tests.base import BaseTestCase
 
 
 class TestDatabase(BaseTestCase):
     def setUp(self) -> None:
-        super().setUp(discovery=False)
+        super().setUp()
 
         with db.session.begin_nested():