diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2023-05-04 14:46:23 -0400 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2023-05-18 13:57:13 -0400 |
commit | a39ddd1a9cb4b4c5afa80e0fbc05ed678708f2ce (patch) | |
tree | 3968bd8beadb58edf624a141b51db7b44f05cce3 /tasks.py | |
parent | e22c5ea330814801d8487dc3da347f987bafe5ec (diff) |
Modernize auth tests to use shared server manager
Also move auth tests to be new style filename, obj naming
Also allow test task module selector to see new-style test modules
Diffstat (limited to 'tasks.py')
-rw-r--r-- | tasks.py | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1,4 +1,5 @@ import os +from pathlib import Path from os.path import join from shutil import rmtree, copytree @@ -50,8 +51,10 @@ def test( opts += " -f" modstr = "" if module is not None: - # NOTE: implicit test_ prefix as we're not on pytest-relaxed yet - modstr = " tests/test_{}.py".format(module) + base = f"{module}.py" + tests = Path("tests") + legacy = tests / f"test_{base}" + modstr = str(legacy if legacy.exists() else tests / base) # Switch runner depending on coverage or no coverage. # TODO: get pytest's coverage plugin working, IIRC it has issues? runner = "pytest" |