mirror of
https://github.com/python/cpython.git
synced 2025-08-01 23:53:15 +00:00
Issue 4998: __slots__ on Fractions was useless.
This commit is contained in:
parent
e548d2487d
commit
933d3a7a54
3 changed files with 18 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue