Permalink
Browse files

Make tests work in py2 and py3

  • Loading branch information...
1 parent 05a0a9c commit 0a38182b8b0c0b2fd575c5b0c5e145153792af0e @Signum Signum committed Dec 4, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 tests/test_paginate.py
View
@@ -6,7 +6,7 @@
import unittest
from nose.plugins.skip import SkipTest
-from nose.tools import eq_, raises
+from nose.tools import eq_, raises, assert_in
import paginate
@@ -50,7 +50,8 @@ def test_many_pages():
items = range(100)
page = paginate.Page(items, page=0, items_per_page=15)
url = "http://example.org/foo/page=$page"
- eq_(page.collection_type, range)
+ #eq_(page.collection_type, range) <-- py3 only
+ assert_in(page.collection_type, (range,list) )
eq_(page.page, 1)
eq_(page.first_item, 1)
eq_(page.last_item, 15)

0 comments on commit 0a38182

Please sign in to comment.