Skip to content

Commit

Permalink
Remove python2 case
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Wittgen committed Sep 7, 2024
1 parent a38bf09 commit 9d92248
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions tests/test_RangeSet.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import pickle
import sys
import unittest

from lsst.sphgeom import RangeSet
Expand Down Expand Up @@ -90,13 +89,8 @@ def testRanges(self):

def testString(self):
s = RangeSet(1, 10)
if sys.version_info[0] >= 3:
self.assertEqual(str(s), "[(1, 10)]")
self.assertEqual(repr(s), "RangeSet([(1, 10)])")
else:
# pybind11 maps C++ integers to Python long instances in Python 2.
self.assertEqual(str(s), "[(1L, 10L)]")
self.assertEqual(repr(s), "RangeSet([(1L, 10L)])")
self.assertEqual(str(s), "[(1, 10)]")
self.assertEqual(repr(s), "RangeSet([(1, 10)])")
self.assertEqual(s, eval(repr(s), {"RangeSet": RangeSet}))

def testPickle(self):
Expand Down

0 comments on commit 9d92248

Please sign in to comment.