diff --git a/tests/testnumbergen.py b/tests/testnumbergen.py
index <HASH>..<HASH> 100644
--- a/tests/testnumbergen.py
+++ b/tests/testnumbergen.py
@@ -18,7 +18,7 @@ class TestUniformRandom(unittest.TestCase):
                 seed=_seed,
                 lbound=lbound,
                 ubound=ubound)
-        for _ in xrange(_iterations):
+        for _ in range(_iterations):
             value = gen()
             self.assertTrue(lbound <= value < ubound)
 
@@ -30,7 +30,7 @@ class TestUniformRandomOffset(unittest.TestCase):
                 seed=_seed,
                 mean=(ubound + lbound) / 2,
                 range=ubound - lbound)
-        for _ in xrange(_iterations):
+        for _ in range(_iterations):
             value = gen()
             self.assertTrue(lbound <= value < ubound)
Fixed numbergen unit tests for Python 3 compatibility