Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Commit

Permalink
uncomment memoryError test, since github workflow time limit is cancled.
Browse files Browse the repository at this point in the history
  • Loading branch information
helix-xx committed Apr 5, 2024
1 parent 0cf6799 commit f0fb723
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions test/encode_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@ class A:
with self.assertRaises(TypeError):
cjson.dumps(case)

# TODO uncomment this later
# # MemoryError
# test_cases = [
# [1] * 2147483648
# ]

# for case in test_cases:
# with self.subTest(msg=f'encoding_fail_test(case={case})'):
# with self.assertRaises(MemoryError):
# cjson.dumps(case)
# MemoryError
test_cases = [
[1] * 2147483648
]

for case in test_cases:
with self.subTest(msg=f'encoding_fail_test(case={case})'):
with self.assertRaises(MemoryError):
cjson.dumps(case)

def test_default(self):
import cjson
Expand Down

0 comments on commit f0fb723

Please sign in to comment.