Skip to content

Commit

Permalink
add the id of the issue to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
realead committed Jul 21, 2018
1 parent 7f12a1d commit 124b095
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pandas/tests/test_algos.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,12 +502,14 @@ def test_obj_none_preservation(self):
tm.assert_numpy_array_equal(result, expected, strict_nan=True)

def test_signed_zero(self):
# GH 21866
a = np.array([-0.0, 0.0])
result = pd.unique(a)
expected = np.array([-0.0]) # 0.0 and -0.0 are equivalent
tm.assert_numpy_array_equal(result, expected)

def test_different_nans(self):
# GH 21866
# create different nans from bit-patterns:
NAN1 = struct.unpack("d", struct.pack("=Q", 0x7ff8000000000000))[0]
NAN2 = struct.unpack("d", struct.pack("=Q", 0x7ff8000000000001))[0]
Expand Down Expand Up @@ -1106,6 +1108,7 @@ def test_lookup_nan(self, writable):
dtype=np.int64))

def test_add_signed_zeros(self):
# GH 21866 inconsistent hash-function for float64
# default hash-function would lead to different hash-buckets
# for 0.0 and -0.0 if there are more than 2^30 hash-buckets
# but this would mean 16GB
Expand All @@ -1116,6 +1119,7 @@ def test_add_signed_zeros(self):
assert len(m) == 1 # 0.0 and -0.0 are equivalent

def test_add_different_nans(self):
# GH 21866 inconsistent hash-function for float64
# create different nans from bit-patterns:
NAN1 = struct.unpack("d", struct.pack("=Q", 0x7ff8000000000000))[0]
NAN2 = struct.unpack("d", struct.pack("=Q", 0x7ff8000000000001))[0]
Expand Down

0 comments on commit 124b095

Please sign in to comment.