summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_raise.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_raise.py')
-rw-r--r--Lib/test/test_raise.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_raise.py b/Lib/test/test_raise.py
index 8ae9210..b169867 100644
--- a/Lib/test/test_raise.py
+++ b/Lib/test/test_raise.py
@@ -174,11 +174,14 @@ class TestCause(unittest.TestCase):
raise ValueError from None
except ValueError as exc:
self.assertIsNone(exc.__cause__)
- raise exc from Ellipsis
+ self.assertTrue(exc.__suppress_context__)
+ exc.__suppress_context__ = False
+ raise exc
except ValueError as exc:
e = exc
- self.assertIs(e.__cause__, Ellipsis)
+ self.assertIsNone(e.__cause__)
+ self.assertFalse(e.__suppress_context__)
self.assertIsInstance(e.__context__, TypeError)
def test_invalid_cause(self):