Skip to content

Commit 02b91c7

Browse files
authored
Merge pull request #13 from xoviat/testrunner
Add basic py.test structure.
2 parents 7a4a2b4 + cbd44ba commit 02b91c7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+12998
-4
lines changed

appveyor.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ environment:
1919
# Break the tests into two runs, since together they exceed the 1 hour limit.
2020
# See https://github.com/pyinstaller/pyinstaller/issues/2024#issuecomment-224129520
2121
# for more discussion.
22-
TEST1_CMD: "python pywin32_testall.py"
22+
TEST1_CMD: "py.test"
2323

2424
- PYTHON: "C:\\Python35"
2525
PYTHON_VERSION: "3.5"
@@ -28,13 +28,13 @@ environment:
2828
# Break the tests into two runs, since together they exceed the 1 hour limit.
2929
# See https://github.com/pyinstaller/pyinstaller/issues/2024#issuecomment-224129520
3030
# for more discussion.
31-
TEST1_CMD: "python pywin32_testall.py"
31+
TEST1_CMD: "py.test"
3232

3333
- PYTHON: "C:\\Python36"
3434
PYTHON_VERSION: "3.6"
3535
PYTHON_ARCH: "32"
3636
VCVARSALL: "x86"
37-
TEST1_CMD: "python pywin32_testall.py"
37+
TEST1_CMD: "py.test"
3838

3939
- PYTHON: "C:\\Python36-x64"
4040
PYTHON_VERSION: "3.6"
@@ -43,7 +43,7 @@ environment:
4343
# Break the tests into two runs, since together they exceed the 1 hour limit.
4444
# See https://github.com/pyinstaller/pyinstaller/issues/2024#issuecomment-224129520
4545
# for more discussion.
46-
TEST1_CMD: "python pywin32_testall.py"
46+
TEST1_CMD: "py.test"
4747

4848
matrix:
4949
allow_failures:

setup.cfg

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[tool:pytest]
2+
# Do not put timeout to all tests because it does not play nice with running
3+
# tests in parallel. Rather put timeout to single tests: that are known to
4+
# @pytest.mark.timeout(timeout=0)
5+
# 'thread' timeout method adds more overhead but works in Travis containers.
6+
timeout_method = thread
7+
8+
# Look for tests only in tests directories.
9+
# Later we could change this to just "tests/**/test_*.py"
10+
# "tests/win32com/test_*.py"
11+
python_files = "tests/win32/test_*.py" "tests/win32com/test_ROT.py"
12+
13+
# Display summary info for (s)skipped, (X)xpassed, (x)xfailed, (f)failed and (e)errored tests
14+
# Skip doctest text files
15+
# If you want to run just a subset of test use command
16+
#
17+
# py.test -k test_name
18+
#
19+
addopts = "-v" "-rsxXfE" "--doctest-glob=" "--continue-on-collection-errors"

tests/__init__.py

Whitespace-only changes.

tests/adodbapi/RunTests.bat

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@Echo off
2+
if "%1"=="" goto skip_arg
3+
set PYTHON=%1
4+
goto skip_python:
5+
:skip_arg
6+
set PYTHON=python
7+
:skip_python
8+
Echo on
9+
echo .
10+
echo .
11+
del *.pyc
12+
echo .
13+
REM unit test
14+
call %PYTHON% adodbapitest.py --all %2 %3
15+
echo .
16+
echo .
17+
REM generic test
18+
call %PYTHON% test_adodbapi_dbapi20.py %2
19+
echo .
20+
echo .
21+
@Echo off
22+
pause Testing complete

0 commit comments

Comments
 (0)