diff options
| author | Sergey Maranchuk <slav0nic@python.su> | 2020-04-17 23:35:37 +0300 |
|---|---|---|
| committer | Sergey Maranchuk <slav0nic@python.su> | 2020-04-19 00:53:36 +0300 |
| commit | aadf19a5b81645b18e50699fe2f180aeff3409b3 (patch) | |
| tree | e8031a2301383f5b5c05fb1a90045842fa3ae296 /tests | |
| parent | 6668e43d2d67db4574e08a9d54bd80eb105c1b28 (diff) | |
| download | pyramid-aadf19a5b81645b18e50699fe2f180aeff3409b3.tar.gz pyramid-aadf19a5b81645b18e50699fe2f180aeff3409b3.tar.bz2 pyramid-aadf19a5b81645b18e50699fe2f180aeff3409b3.zip | |
rename __nonzero__() to __bool__()
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_registry.py | 8 | ||||
| -rw-r--r-- | tests/test_testing.py | 4 |
2 files changed, 2 insertions, 10 deletions
diff --git a/tests/test_registry.py b/tests/test_registry.py index ce0370468..022cc5ba1 100644 --- a/tests/test_registry.py +++ b/tests/test_registry.py @@ -11,9 +11,9 @@ class TestRegistry(unittest.TestCase): def _makeOne(self, *args, **kw): return self._getTargetClass()(*args, **kw) - def test___nonzero__(self): + def test___bool__(self): registry = self._makeOne() - self.assertEqual(registry.__nonzero__(), True) + self.assertEqual(registry.__bool__(), True) def test__lock(self): registry = self._makeOne() @@ -380,10 +380,6 @@ class TestIntrospectable(unittest.TestCase): "<Introspectable category 'category', discriminator 'discrim'>", ) - def test___nonzero__(self): - inst = self._makeOnePopulated() - self.assertEqual(inst.__nonzero__(), True) - def test___bool__(self): inst = self._makeOnePopulated() self.assertEqual(inst.__bool__(), True) diff --git a/tests/test_testing.py b/tests/test_testing.py index 5273e7f79..e630eb00b 100644 --- a/tests/test_testing.py +++ b/tests/test_testing.py @@ -103,10 +103,6 @@ class TestDummyResource(unittest.TestCase): self.assertEqual(L(resource.keys()), L(resource.subs.keys())) self.assertEqual(len(resource), 2) - def test_nonzero(self): - resource = self._makeOne() - self.assertEqual(resource.__nonzero__(), True) - def test_bool(self): resource = self._makeOne() self.assertEqual(resource.__bool__(), True) |
