Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mini seed output of int64 data #2356 #2373


Update of test_downcast_int64_to_int32

Added a check that smaller negative numbers also pass, and too large negative numbers do fail. Also changed from writing long numbers to powers of 2.
  • Loading branch information...
LMurrayBergquist authored and megies committed Apr 10, 2019
commit 7c3ae2146af146266857861b5ea1439deac081c3
@@ -162,7 +162,7 @@ def test_downcast_int64_to_int32(self):
by downcasting the data to int32 type data.
# create a dummy stream with int64 data
x = np.arange(20, dtype = np.int64)
x = np.array([1,2,-3,4], dtype = np.int64)
tr = Trace(x)
st = Stream()
@@ -177,8 +177,8 @@ def test_downcast_int64_to_int32(self):

# Test that error message is indeed raised when data cannot be downcast
# Create dummy stream that cannot be properly downcast to int64
x_int64 = np.array([24, 3, 922337203685477580, 5], dtype=np.int64)
x_int64_negative = np.array([5, 4, -3, -922337203685477580, 0], dtype=np.int64)
x_int64 = np.array([1, 2, 3, 2**55], dtype=np.int64)
x_int64_negative = np.array([1, -2, 3, -2**55], dtype=np.int64)
tr_int64 = Trace(x_int64)
tr_int64_negative = Trace(x_int64_negative)
st_int64 = Stream()
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.