test/unittest_rset.py
changeset 10602 4845012cfc8e
parent 10600 180aa08cad48
child 10603 65ad6980976e
--- a/test/unittest_rset.py	Wed Sep 16 14:45:15 2015 +0200
+++ b/test/unittest_rset.py	Mon Sep 14 12:19:48 2015 +0200
@@ -19,7 +19,8 @@
 """unit tests for module cubicweb.utils"""
 
 from urlparse import urlsplit
-import pickle
+
+from six.moves import cPickle as pickle
 
 from rql import parse
 
@@ -100,7 +101,9 @@
 
     def test_pickle(self):
         del self.rset.req
-        self.assertEqual(len(pickle.dumps(self.rset)), 376)
+        # 373 for python 2.7's cPickle
+        # 376 for the old python pickle implementation
+        self.assertIn(len(pickle.dumps(self.rset)), (373, 376))
 
     def test_build_url(self):
         with self.admin_access.web_request() as req: