diff options
| author | Kevin Sheppard <kevin.k.sheppard@gmail.com> | 2019-04-08 10:11:07 +0100 |
|---|---|---|
| committer | mattip <matti.picus@gmail.com> | 2019-05-20 18:45:27 +0300 |
| commit | 7e8e19f9a3b452fdbd992568348b393c31fba005 (patch) | |
| tree | 663fb54dce4ae97ce434a21fab1e9e449a4e0ec7 /numpy/random/randomgen/tests/test_direct.py | |
| parent | fa8af41c9d375072b2c7af66e5f7f01df4754841 (diff) | |
| download | numpy-7e8e19f9a3b452fdbd992568348b393c31fba005.tar.gz | |
BUG: Correct handling of nans
Improve consistency of nan handling
Prevent nans prducing values from int functions
Add tests to ensure guards work
Synchronize with randomgen
Remove comments no longer relevant
Diffstat (limited to 'numpy/random/randomgen/tests/test_direct.py')
| -rw-r--r-- | numpy/random/randomgen/tests/test_direct.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/random/randomgen/tests/test_direct.py b/numpy/random/randomgen/tests/test_direct.py index 6e856de41..22fdcd865 100644 --- a/numpy/random/randomgen/tests/test_direct.py +++ b/numpy/random/randomgen/tests/test_direct.py @@ -233,14 +233,14 @@ class Base(object): def test_repr(self): rs = RandomGenerator(self.brng(*self.data1['seed'])) - assert 'RandomGenerator' in rs.__repr__() - assert str(hex(id(rs)))[2:].upper() in rs.__repr__() + assert 'RandomGenerator' in repr(rs) + assert '{:#x}'.format(id(rs)).upper().replace('X', 'x') in repr(rs) def test_str(self): rs = RandomGenerator(self.brng(*self.data1['seed'])) assert 'RandomGenerator' in str(rs) assert str(self.brng.__name__) in str(rs) - assert str(hex(id(rs)))[2:].upper() not in str(rs) + assert '{:#x}'.format(id(rs)).upper().replace('X', 'x') not in str(rs) def test_generator(self): brng = self.brng(*self.data1['seed']) |
