mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
This commit is contained in:
parent
037ffbf182
commit
39411f60a2
3 changed files with 5 additions and 34 deletions
|
@ -1834,18 +1834,9 @@ class ContextAPItests(unittest.TestCase):
|
|||
# only, the attribute should be gettable/settable via both
|
||||
# `clamp` and `_clamp`; in Python 3.3, `_clamp` should be
|
||||
# removed.
|
||||
c = Context(clamp = 0)
|
||||
self.assertEqual(c.clamp, 0)
|
||||
|
||||
with check_warnings(("", DeprecationWarning)):
|
||||
c._clamp = 1
|
||||
self.assertEqual(c.clamp, 1)
|
||||
with check_warnings(("", DeprecationWarning)):
|
||||
self.assertEqual(c._clamp, 1)
|
||||
c.clamp = 0
|
||||
self.assertEqual(c.clamp, 0)
|
||||
with check_warnings(("", DeprecationWarning)):
|
||||
self.assertEqual(c._clamp, 0)
|
||||
c = Context()
|
||||
with self.assertRaises(AttributeError):
|
||||
clamp_value = c._clamp
|
||||
|
||||
def test_abs(self):
|
||||
c = Context()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue