diff options
author | Hugo van Kemenade <hugovk@users.noreply.github.com> | 2022-06-04 11:43:47 +0300 |
---|---|---|
committer | Hugo van Kemenade <hugovk@users.noreply.github.com> | 2022-06-04 11:51:16 +0300 |
commit | 8e3e36002a648a11cf0ee8a2b93b3ef813e7db05 (patch) | |
tree | 22c550bcd2fe1e42ec24b783376d0d64d5531dcc | |
parent | 2fc8b280dc04db1e337f602f347cea3a10397ad3 (diff) | |
download | testtools-8e3e36002a648a11cf0ee8a2b93b3ef813e7db05.tar.gz |
Fix DeprecationWarning: Only valid in 1.8.1 and earlier. Use skipTest instead.
-rw-r--r-- | testtools/tests/matchers/test_filesystem.py | 2 | ||||
-rw-r--r-- | testtools/tests/samplecases.py | 2 | ||||
-rw-r--r-- | testtools/tests/test_compat.py | 2 | ||||
-rw-r--r-- | testtools/tests/test_testcase.py | 2 | ||||
-rw-r--r-- | testtools/tests/test_testresult.py | 6 | ||||
-rw-r--r-- | testtools/tests/test_testsuite.py | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/testtools/tests/matchers/test_filesystem.py b/testtools/tests/matchers/test_filesystem.py index c4cd297..a156bbb 100644 --- a/testtools/tests/matchers/test_filesystem.py +++ b/testtools/tests/matchers/test_filesystem.py @@ -223,7 +223,7 @@ class TestSamePath(TestCase, PathHelpers): try: os.symlink(source, target) except (AttributeError, NotImplementedError): - self.skip("No symlink support") + self.skipTest("No symlink support") self.assertThat(source, SamePath(target)) self.assertThat(target, SamePath(source)) diff --git a/testtools/tests/samplecases.py b/testtools/tests/samplecases.py index bd793d7..4dbfc8a 100644 --- a/testtools/tests/samplecases.py +++ b/testtools/tests/samplecases.py @@ -96,7 +96,7 @@ def _failure(case): def _skip(case): - case.skip('arbitrary skip message') + case.skipTest('arbitrary skip message') def _expected_failure(case): diff --git a/testtools/tests/test_compat.py b/testtools/tests/test_compat.py index c09a03c..1246ead 100644 --- a/testtools/tests/test_compat.py +++ b/testtools/tests/test_compat.py @@ -39,7 +39,7 @@ class TestUnicodeOutputStream(testtools.TestCase): def setUp(self): super().setUp() if sys.platform == "cli": - self.skip("IronPython shouldn't wrap streams to do encoding") + self.skipTest("IronPython shouldn't wrap streams to do encoding") def test_no_encoding_becomes_ascii(self): """A stream with no encoding attribute gets ascii/replace strings""" diff --git a/testtools/tests/test_testcase.py b/testtools/tests/test_testcase.py index f75f245..abb05cb 100644 --- a/testtools/tests/test_testcase.py +++ b/testtools/tests/test_testcase.py @@ -1455,7 +1455,7 @@ class TestSkipping(TestCase): def test_skip_causes_skipException(self): self.assertThat( - lambda: self.skip("Skip this test"), + lambda: self.skipTest("Skip this test"), Raises(MatchesException(self.skipException))) def test_can_use_skipTest(self): diff --git a/testtools/tests/test_testresult.py b/testtools/tests/test_testresult.py index 4fbf15d..15b4ac4 100644 --- a/testtools/tests/test_testresult.py +++ b/testtools/tests/test_testresult.py @@ -1566,7 +1566,7 @@ class TestTextTestResult(TestCase): DocTestMatches("...\nFAILED (failures=1)\n", doctest.ELLIPSIS)) def test_stopTestRun_shows_details(self): - self.skip("Disabled per bug 1188420") + self.skipTest("Disabled per bug 1188420") def run_tests(): self.result.startTestRun() make_erroring_test().run(self.result) @@ -2518,7 +2518,7 @@ class TestNonAsciiResults(TestCase): # the file without closing it which breaks non-refcounted pythons codecs.lookup(encoding) except LookupError: - self.skip("Encoding unsupported by implementation: %r" % encoding) + self.skipTest("Encoding unsupported by implementation: %r" % encoding) f = codecs.open(os.path.join(self.dir, name + ".py"), "w", encoding) try: f.write(contents) @@ -2568,7 +2568,7 @@ class TestNonAsciiResults(TestCase): return u, u except (LookupError, UnicodeError): pass - self.skip("Could not find a sample text for encoding: %r" % encoding) + self.skipTest("Could not find a sample text for encoding: %r" % encoding) def _as_output(self, text): return text diff --git a/testtools/tests/test_testsuite.py b/testtools/tests/test_testsuite.py index 65cb88d..358ac3a 100644 --- a/testtools/tests/test_testsuite.py +++ b/testtools/tests/test_testsuite.py @@ -253,7 +253,7 @@ class TestFixtureSuite(TestCase): def setUp(self): super().setUp() if FunctionFixture is None: - self.skip("Need fixtures") + self.skipTest("Need fixtures") def test_fixture_suite(self): log = [] |