Skip to content

Commit 7aeee85

Browse files
Added tests for large numbers
1 parent b196878 commit 7aeee85

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pandas/tools/tests/test_util.py

+9
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ def test_invalid_input(self):
5757
msg = "Input must be a list-like of list-likes"
5858
for X in invalid_inputs:
5959
tm.assertRaisesRegexp(TypeError, msg, cartesian_product, X=X)
60+
61+
def test_large_input(self):
62+
# test failure of large inputs on windows OS
63+
X = np.arange(65536)
64+
Y = np.arange(65535)
65+
result1, result2 = cartesian_product([X, Y])
66+
expected1, expected2 = np.asarray(list(pd.compat.product(X, Y))).T
67+
tm.assert_numpy_array_equal(result1, expected1)
68+
tm.assert_numpy_array_equal(result2, expected2)
6069

6170

6271
class TestLocaleUtils(tm.TestCase):

0 commit comments

Comments
 (0)