Skip to content

Commit

Permalink
Use asbytes for Python 3 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
teoliphant committed Feb 8, 2012
1 parent 4c0576f commit 26802c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion numpy/core/tests/test_ufunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import numpy as np
from numpy.testing import *
import numpy.core.umath_tests as umt
from numpy.compat import asbytes

class TestUfunc(TestCase):
def test_pickle(self):
Expand All @@ -11,7 +12,7 @@ def test_pickle(self):

def test_pickle_withstring(self):
import pickle
astring = "cnumpy.core\n_ufunc_reconstruct\np0\n(S'numpy.core.umath'\np1\nS'cos'\np2\ntp3\nRp4\n."
astring = asbytes("cnumpy.core\n_ufunc_reconstruct\np0\n(S'numpy.core.umath'\np1\nS'cos'\np2\ntp3\nRp4\n.")
assert pickle.loads(astring) is np.cos

def test_reduceat_shifting_sum(self) :
Expand Down

0 comments on commit 26802c9

Please sign in to comment.