Skip to content

Commit

Permalink
Merge pull request #86 from datadriventests/nosegate-fix
Browse files Browse the repository at this point in the history
Remove nose dependency for good
  • Loading branch information
wswld authored May 14, 2020
2 parents d6d1f24 + b0be482 commit 97cf43b
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 92 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ jobs:
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with nosetests
- name: Test with pytest
run: |
nosetests
pytest
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ ddt.egg-info/
/docs/_build/
.tox
.ropeproject
venv/
venv/
htmlcov/
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
nosetests --with-coverage --cover-html --cover-package=ddt
pytest --cov=ddt --cov-report html
flake8 ddt.py test || echo "Flake8 errors"
(cd docs; make html)
2 changes: 0 additions & 2 deletions ddt.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import re
from enum import Enum, unique
from functools import wraps
from nose.tools import nottest

try:
import yaml
Expand Down Expand Up @@ -41,7 +40,6 @@


@unique
@nottest
class TestNameFormat(Enum):
"""
An enum to configure how ``mk_test_name()`` to compose a test name. Given
Expand Down
18 changes: 9 additions & 9 deletions docs/example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,40 +26,40 @@ This allows you to write your tests as:

Where ``test_data_dict_dict.json``:

.. literalinclude:: ../test/test_data_dict_dict.json
.. literalinclude:: ../test/data/test_data_dict_dict.json
:language: javascript

and ``test_data_dict_dict.yaml``:

.. literalinclude:: ../test/test_data_dict_dict.yaml
.. literalinclude:: ../test/data/test_data_dict_dict.yaml
:language: yaml

and ``test_data_dict.json``:

.. literalinclude:: ../test/test_data_dict.json
.. literalinclude:: ../test/data/test_data_dict.json
:language: javascript

and ``test_data_dict.yaml``:

.. literalinclude:: ../test/test_data_dict.yaml
.. literalinclude:: ../test/data/test_data_dict.yaml
:language: yaml

and ``test_data_list.json``:

.. literalinclude:: ../test/test_data_list.json
.. literalinclude:: ../test/data/test_data_list.json
:language: javascript

and ``test_data_list.yaml``:

.. literalinclude:: ../test/test_data_list.yaml
.. literalinclude:: ../test/data/test_data_list.yaml
:language: yaml

And then run them with your favourite test runner, e.g. if you use nose::
And then run them with your favourite test runner, e.g. if you use pytest::

$ nosetests -v test/test_example.py
$ pytest test/test_example.py

..
program-output:: nosetests -v ../test/test_example.py
program-output:: pytest ../test/test_example.py
The number of test cases actually run and reported separately has been
multiplied.
Expand Down
1 change: 0 additions & 1 deletion requirements/build.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-r test.txt
nose
Sphinx
sphinxcontrib-programoutput
2 changes: 1 addition & 1 deletion requirements/release.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
wheel
setuptools
twine
nose
pytest
3 changes: 2 additions & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
codecov
coverage
flake8
nose
pytest
pytest-cov
six>=1.4.0
PyYAML
mock; python_version < '3.3'
Loading

0 comments on commit 97cf43b

Please sign in to comment.