summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_fractions.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-02-12 17:58:36 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-02-12 17:58:36 (GMT)
commitc28ad27dbb7e79486691c814d0c31b8da7ad2602 (patch)
tree3abd985279ffc0076e4d1bbd9367ab245a052c22 /Lib/test/test_fractions.py
parentbc448664af5add9f76400c1a8aee0e4324bc609b (diff)
downloadcpython-c28ad27dbb7e79486691c814d0c31b8da7ad2602.zip
cpython-c28ad27dbb7e79486691c814d0c31b8da7ad2602.tar.gz
cpython-c28ad27dbb7e79486691c814d0c31b8da7ad2602.tar.bz2
Issue 4998: restore utility of __slots__ on Fraction.
(forward merge of r68813).
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 6851d2d..91fcd26 100644
--- a/Lib/test/test_fractions.py
+++ b/Lib/test/test_fractions.py
@@ -407,6 +407,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)