summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Howitz <mh@gocept.com>2021-11-11 08:26:08 +0100
committerMichael Howitz <mh@gocept.com>2021-11-11 08:26:08 +0100
commitc2a9992080c7c02982ccb5eed7781abc51bb3f32 (patch)
treee017b9efc3ff371f22f2f651819f99634d777887
parent4191c823c471849079ee1254e5d79251bf75e1df (diff)
downloadzope-security-c2a9992080c7c02982ccb5eed7781abc51bb3f32.tar.gz
Remove obsolete tests.
I renamed the tests (that's why their name ends with `2`) there where methods with the same names around line 1600. The other tests assure that a TypeError is raised when calling `pow(x, y, proxy)` because "a PyProxy cannot lie about its type". Interestingly the deleted tests did not fail on CPython but the tests expecting the TypeError were locally successful, too, but not at GHA – that's strange. I am restoring here the status before my renaming of the tests: The now deleted tests did not run because of the name clash.
-rw-r--r--src/zope/security/tests/test_proxy.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/zope/security/tests/test_proxy.py b/src/zope/security/tests/test_proxy.py
index ef664ee..adbb4f2 100644
--- a/src/zope/security/tests/test_proxy.py
+++ b/src/zope/security/tests/test_proxy.py
@@ -617,25 +617,6 @@ class AbstractProxyTestBase(object):
self.assertRaises(ForbiddenAttribute, lambda: pow(x, proxy))
self.assertEqual(checker._checked, '__rpow__')
- @unittest.expectedFailure
- def test___pow___w_z_proxied_allowed2(self):
- # There is no method `__3pow__` - is this test obsolete?
- x, y, z = 3, 4, 7
- checker = DummyChecker()
- proxy = self._makeOne(z, checker)
- self.assertEqual(pow(x, y, proxy), pow(x, y, z))
- self.assertEqual(checker._checked, '__3pow__') # pragma: no cover
-
- @unittest.expectedFailure
- def test___pow___w_z_proxied_forbidden2(self):
- # There is no method `__3pow__` - is this test obsolete?
- from zope.security.interfaces import ForbiddenAttribute
- x, y, z = 3, 4, 7
- checker = DummyChecker(ForbiddenAttribute)
- proxy = self._makeOne(z, checker)
- self.assertRaises(ForbiddenAttribute, lambda: pow(x, y, proxy))
- self.assertEqual(checker._checked, '__3pow__') # pragma: no cover
-
def test___neg___w_checker_allows(self):
target = 3
checker = DummyChecker()