Skip to content

Commit b516583

Browse files
committed
Improve test compatibility with pytest
Also make it simpler to eventually split the single test file we currently have.
1 parent 356118f commit b516583

File tree

5 files changed

+7
-12
lines changed

5 files changed

+7
-12
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
- name: Build package
2525
run: python -m pip install .
2626
- name: Run tests
27-
run: python tests/tests.py
27+
run: python -m unittest -v

PYPIREADME.rst

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,11 @@ You can force this at installation time as follows:
6161
Running the test suite
6262
----------------------
6363

64-
There are several ways of running the test suite:
64+
From the top level directory, run: ``python -m unittest -v``
6565

66-
- Run the test with the current Python interpreter:
67-
68-
From the toplevel directory, run: ``python tests/tests.py``
69-
70-
- Use Tox to run the test suite in several virtualenvs with several interpreters
71-
72-
From the toplevel directory, run: ``tox -e py36,py37,py38,py39`` this will run the test suite
73-
on Python 3.6 through 3.9 (you'll need to have them installed beforehand)
66+
NOTE: Running the tests requires internet access and are somewhat environment sensitive because real DNS quesries
67+
are made, there is no mocking. If you observe a failure that the CI cannot reproduce, please try to setup an
68+
environment as close as the current CI.
7469

7570

7671
Using it from the cli, a la dig
@@ -114,7 +109,7 @@ Unless stated otherwise on-file pycares uses the MIT license, check LICENSE file
114109
Supported Python versions
115110
-------------------------
116111

117-
Python >= 3.6 are supported. Both CPython and PyPy are supported.
112+
Python >= 3.7 are supported. Both CPython and PyPy are supported.
118113

119114

120115
Contributing

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ You can force this at installation time as follows:
6767
Running the test suite
6868
----------------------
6969

70-
From the top level directory, run: ``python tests/tests.py``
70+
From the top level directory, run: ``python -m unittest -v``
7171

7272
NOTE: Running the tests requires internet access and are somewhat environment sensitive because real DNS quesries
7373
are made, there is no mocking. If you observe a failure that the CI cannot reproduce, please try to setup an

tests/__init__.py

Whitespace-only changes.
File renamed without changes.

0 commit comments

Comments
 (0)