diff options
author | Jelmer Vernooij <jelmer@jelmer.uk> | 2022-11-19 17:57:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-19 17:57:18 +0000 |
commit | 142cb77e2b85bd606be16208ca55012b8eff136a (patch) | |
tree | 5d60158c01f2253ced9270ecbe22d7e1220e4e40 /testtools/tests/test_testcase.py | |
parent | 347a27dd5a95a890ac1d615e46e94d9676dd2f48 (diff) | |
parent | d602d9a2532fa952647f635a2e97fe3de3cec49b (diff) | |
download | testtools-mypy.tar.gz |
Merge branch 'master' into mypymypy
Diffstat (limited to 'testtools/tests/test_testcase.py')
-rw-r--r-- | testtools/tests/test_testcase.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/testtools/tests/test_testcase.py b/testtools/tests/test_testcase.py index c2766ff..fa38d44 100644 --- a/testtools/tests/test_testcase.py +++ b/testtools/tests/test_testcase.py @@ -5,6 +5,7 @@ from doctest import ELLIPSIS from pprint import pformat import sys +import _thread import unittest from testtools import ( @@ -90,6 +91,10 @@ class TestPlaceHolder(TestCase): test = hash(self) self.assertEqual(unittest.TestCase.__hash__(self), test) + def test_testcase_equals_edgecase(self): + # Not all python objects have a __dict__ attribute + self.assertFalse(self == _thread.RLock()) + def test_repr_just_id(self): # repr(placeholder) shows you how the object was constructed. test = PlaceHolder("test id") |