summaryrefslogtreecommitdiff
path: root/Lib/test/test_fractions.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_fractions.py')
-rw-r--r--Lib/test/test_fractions.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_fractions.py b/Lib/test/test_fractions.py
index a6c3c32cb0..0509f92ccb 100644
--- a/Lib/test/test_fractions.py
+++ b/Lib/test/test_fractions.py
@@ -394,6 +394,11 @@ class FractionTest(unittest.TestCase):
self.assertEqual(id(r), id(copy(r)))
self.assertEqual(id(r), id(deepcopy(r)))
+ def test_slots(self):
+ # Issue 4998
+ r = F(13, 7)
+ self.assertRaises(AttributeError, setattr, r, 'a', 10)
+
def test_main():
run_unittest(FractionTest, GcdTest)