Issue 4998: restore utility of __slots__ on Fraction.

(forward merge of r68813).
This commit is contained in:
Mark Dickinson 2009-02-12 17:58:36 +00:00
parent bc448664af
commit c28ad27dbb
3 changed files with 19 additions and 0 deletions

View file

@ -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)