Skip to content

Commit

Permalink
Add testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed Mar 17, 2023
1 parent 0102cf0 commit cff813b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Lib/test/test_bigmem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,15 @@ def test_sort(self, size):
self.assertEqual(l[-10:], [5] * 10)


class DictTest(unittest.TestCase):

@bigmemtest(size=357913941, memuse=160)
def test_dict(self, size):
# https://github.com/python/cpython/issues/102701
d = dict.fromkeys(range(size))
d[size] = 1


if __name__ == '__main__':
if len(sys.argv) > 1:
support.set_memlimit(sys.argv[1])
Expand Down

0 comments on commit cff813b

Please sign in to comment.