mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-08 21:14:49 +08:00
add pytest config for testing infrastructure
This commit is contained in:
@@ -1,2 +1,3 @@
|
|||||||
-r external/mypy/test-requirements.txt
|
-r external/mypy/test-requirements.txt
|
||||||
-e external/mypy
|
-e external/mypy
|
||||||
|
-e .
|
||||||
@@ -3,5 +3,6 @@
|
|||||||
testpaths = test
|
testpaths = test
|
||||||
python_files = test*.py
|
python_files = test*.py
|
||||||
addopts =
|
addopts =
|
||||||
-nauto
|
; -nauto
|
||||||
--tb=native
|
--tb=native
|
||||||
|
-v
|
||||||
@@ -13,14 +13,17 @@ TEST_DATA_DIR = ROOT_DIR / 'test' / 'test-data'
|
|||||||
|
|
||||||
class DjangoTestSuite(DataSuite):
|
class DjangoTestSuite(DataSuite):
|
||||||
files = [
|
files = [
|
||||||
'basic-check.test'
|
'check-postgres-fields.test'
|
||||||
]
|
]
|
||||||
data_prefix = str(TEST_DATA_DIR)
|
data_prefix = str(TEST_DATA_DIR)
|
||||||
|
|
||||||
def run_case(self, testcase: DataDrivenTestCase) -> None:
|
def run_case(self, testcase: DataDrivenTestCase) -> None:
|
||||||
assert testcase.old_cwd is not None, "test was not properly set up"
|
assert testcase.old_cwd is not None, "test was not properly set up"
|
||||||
|
|
||||||
mypy_cmdline = []
|
mypy_cmdline = [
|
||||||
|
'--show-traceback',
|
||||||
|
'--no-silence-site-packages'
|
||||||
|
]
|
||||||
mypy_cmdline.append('--python-version={}'.format('.'.join(map(str,
|
mypy_cmdline.append('--python-version={}'.format('.'.join(map(str,
|
||||||
sys.version_info[:2]))))
|
sys.version_info[:2]))))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user