diff options
author | rgommers <ralf.gommers@googlemail.com> | 2011-03-11 18:02:11 +0800 |
---|---|---|
committer | rgommers <ralf.gommers@googlemail.com> | 2011-03-11 18:06:01 +0800 |
commit | 082903ecc89afe2512f7cab34b6d2b75b44a51c2 (patch) | |
tree | 64f84d68f90866729b0a10c59412f7e5b507b21c | |
parent | 7ca223e626ebf8749a0a7b08ba35c579b62e5e81 (diff) | |
download | numpy-082903ecc89afe2512f7cab34b6d2b75b44a51c2.tar.gz |
TST: Py3K: fix bytes/string test failure in numpy.random.bytes() test.
-rw-r--r-- | numpy/random/tests/test_random.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py index 8acb0680e..81e3eee1e 100644 --- a/numpy/random/tests/test_random.py +++ b/numpy/random/tests/test_random.py @@ -1,6 +1,7 @@ from numpy.testing import TestCase, run_module_suite, assert_,\ assert_raises from numpy import random +from numpy.compat import asbytes import numpy as np @@ -118,8 +119,8 @@ class TestRandomDist(TestCase): def test_bytes(self): np.random.seed(self.seed) actual = np.random.bytes(10) - desired = '\x82Ui\x9e\xff\x97+Wf\xa5' - np.testing.assert_string_equal(actual, desired) + desired = asbytes('\x82Ui\x9e\xff\x97+Wf\xa5') + np.testing.assert_equal(actual, desired) def test_shuffle(self): np.random.seed(self.seed) |