replacing assertEquals into assertEqual
[nepi.git] / test / util / parallel.py
old mode 100644 (file)
new mode 100755 (executable)
index 7f8f5a0..e239ec9
@@ -4,9 +4,8 @@
 #    Copyright (C) 2013 INRIA
 #
 #    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU General Public License as published by
-#    the Free Software Foundation, either version 3 of the License, or
-#    (at your option) any later version.
+#    it under the terms of the GNU General Public License version 2 as
+#    published by the Free Software Foundation;
 #
 #    This program is distributed in the hope that it will be useful,
 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -34,12 +33,12 @@ class ParallelRunTestCase(unittest.TestCase):
         def inc(count):
             count[0] += 1
         
-        for x in xrange(10):
+        for x in range(10):
             runner.put(inc, count)
 
         runner.destroy()
 
-        self.assertEquals(count[0], 10)
+        self.assertEqual(count[0], 10)
 
     def test_run_interrupt(self):
 
@@ -52,7 +51,7 @@ class ParallelRunTestCase(unittest.TestCase):
         runner = ParallelRun(maxthreads = 4)
         runner.start()
        
-        for x in xrange(100):
+        for x in range(100):
             runner.put(sleep)
 
         runner.empty()
@@ -74,14 +73,14 @@ class ParallelRunTestCase(unittest.TestCase):
         runner = ParallelRun(maxthreads = 4)
         runner.start()
        
-        for x in xrange(4):
+        for x in range(4):
             runner.put(inc, count)
 
         runner.put(error)
        
         runner.destroy()
       
-        self.assertEquals(count[0], 4)
+        self.assertEqual(count[0], 4)
         
         self.assertRaises(RuntimeError, runner.sync)