Skip to content

Commit

Permalink
Added pickle test for polynomials
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoRaso authored and charris committed Dec 22, 2022
1 parent 94e405b commit cc7800d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions numpy/polynomial/tests/test_polynomial.py
Expand Up @@ -5,6 +5,7 @@

import numpy as np
import numpy.polynomial.polynomial as poly
import pickle
from copy import deepcopy
from numpy.testing import (
assert_almost_equal, assert_raises, assert_equal, assert_,
Expand Down Expand Up @@ -47,6 +48,11 @@ def test_copy(self):
y = deepcopy(x)
assert_equal(x, y)

def test_pickle(self):
x = poly.Polynomial([1, 2, 3])
y = pickle.loads(pickle.dumps(x))
assert_equal(x, y)

class TestArithmetic:

def test_polyadd(self):
Expand Down

0 comments on commit cc7800d

Please sign in to comment.