Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add testcase
  • Loading branch information
methane committed Mar 17, 2023
commit cff813b4b54ab4c7731ea8baa60c7a06b6f60bb2
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