Skip to content

Commit

Permalink
Add a test case
Browse files Browse the repository at this point in the history
  • Loading branch information
jmao-denver committed May 7, 2024
1 parent 48aee74 commit f6f680b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/test/python/jpy_array_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import jpyutil


jpyutil.init_jvm(jvm_maxmem='32M', jvm_classpath=['target/test-classes'])
jpyutil.init_jvm(jvm_maxmem='8g', jvm_classpath=['target/test-classes'])
import jpy


Expand Down Expand Up @@ -232,6 +232,12 @@ def test_leak(self):
for i in range(1000000):
memory_view = memoryview(j_int_array)

def test_size_greater_than_maxint(self):
jarr = jpy.array("int", 2**30)
mv = memoryview(jarr)
self.assertEqual(mv.nbytes, 2**32)


if __name__ == '__main__':
print('\nRunning ' + __file__)
unittest.main()

0 comments on commit f6f680b

Please sign in to comment.