diff --git a/doc8/tests/test_checks.py b/doc8/tests/test_checks.py index 1776dfe..79e0618 100644 --- a/doc8/tests/test_checks.py +++ b/doc8/tests/test_checks.py @@ -13,16 +13,14 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. - +import unittest import tempfile -import testtools - from doc8 import checks from doc8 import parser -class TestTrailingWhitespace(testtools.TestCase): +class TestTrailingWhitespace(unittest.TestCase): def test_trailing(self): lines = ["a b ", "ab"] check = checks.CheckTrailingWhitespace({}) @@ -34,7 +32,7 @@ def test_trailing(self): self.assertIn(code, check.REPORTS) -class TestTabIndentation(testtools.TestCase): +class TestTabIndentation(unittest.TestCase): def test_tabs(self): lines = [" b", "\tabc", "efg", "\t\tc"] check = checks.CheckIndentationNoTab({}) @@ -46,7 +44,7 @@ def test_tabs(self): self.assertIn(code, check.REPORTS) -class TestCarriageReturn(testtools.TestCase): +class TestCarriageReturn(unittest.TestCase): def test_cr(self): content = b"Windows line ending\r\nLegacy Mac line ending\r" content += (b"a" * 79) + b"\r\n" + b"\r" @@ -62,7 +60,7 @@ def test_cr(self): self.assertIn(code, check.REPORTS) -class TestLineLength(testtools.TestCase): +class TestLineLength(unittest.TestCase): def test_over_length(self): content = b""" === @@ -169,7 +167,7 @@ def test_definition_term_length(self): self.assertEqual(0, len(errors)) -class TestNewlineEndOfFile(testtools.TestCase): +class TestNewlineEndOfFile(unittest.TestCase): def test_newline(self): tests = [ (1, b"testing"), diff --git a/doc8/tests/test_main.py b/doc8/tests/test_main.py index 00b6f93..c7681e3 100644 --- a/doc8/tests/test_main.py +++ b/doc8/tests/test_main.py @@ -3,9 +3,9 @@ from mock import patch, MagicMock import os from io import StringIO +import unittest import shutil import sys -import testtools from doc8.main import main, doc8 @@ -145,7 +145,7 @@ def report(self): return "" -class TestCommandLine(testtools.TestCase): +class TestCommandLine(unittest.TestCase): """ Test command line invocation """ @@ -181,7 +181,7 @@ def test_main__no_quiet_verbose__output_is_verbose(self): self.assertEqual(state, 1) -class TestApi(testtools.TestCase): +class TestApi(unittest.TestCase): """ Test direct code invocation """ @@ -226,7 +226,7 @@ def test_doc8__verbose__verbose_overridden(self): self.assertEqual(result.total_errors, 2) -class TestArguments(testtools.TestCase): +class TestArguments(unittest.TestCase): """ Test that arguments are parsed correctly """ diff --git a/mypy.ini b/mypy.ini index 07afbee..d8f6a2c 100644 --- a/mypy.ini +++ b/mypy.ini @@ -6,6 +6,3 @@ ignore_missing_imports = True [mypy-stevedore] ignore_missing_imports = True - -[mypy-testtools] -ignore_missing_imports = True diff --git a/test-requirements.txt b/test-requirements.txt index 48fd091..737a6b5 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,3 @@ mock # BSD -nose # LGPL -testtools # MIT +pytest # MIT toml # MIT diff --git a/tox.ini b/tox.ini index a840e31..ce4b300 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,7 @@ envlist = lint,py,docs,packaging [testenv] deps = -r{toxinidir}/test-requirements.txt -commands = nosetests {posargs} +commands = pytest {posargs} whitelist_externals = rm