diff options
author | Stefan van der Walt <stefan@sun.ac.za> | 2007-08-28 22:19:35 +0000 |
---|---|---|
committer | Stefan van der Walt <stefan@sun.ac.za> | 2007-08-28 22:19:35 +0000 |
commit | 97c4dd0f2e53398eeb41c326cc147518f0d2d288 (patch) | |
tree | 82a67844fe51a0c11359275dc3a36554b8523da6 /numpy/testing | |
parent | 2b25d303c52af7bde9f0ae856335883380063114 (diff) | |
download | numpy-97c4dd0f2e53398eeb41c326cc147518f0d2d288.tar.gz |
Replace generator expressions for compatibility with Python 2.3.
Diffstat (limited to 'numpy/testing')
-rw-r--r-- | numpy/testing/parametric.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/testing/parametric.py b/numpy/testing/parametric.py index 813ee1bc7..43577d7d4 100644 --- a/numpy/testing/parametric.py +++ b/numpy/testing/parametric.py @@ -262,11 +262,11 @@ if __name__ == '__main__': You must return an iterable (list or generator is fine) containing tuples with the actual method to be called as the first argument, and the arguments for that call later.""" - return ((self.tstX,i) for i in range(5)) + return [(self.tstX,i) for i in range(5)] def testip2(self): """Another independent parametric test factory""" - return ((self.tstY,i) for i in range(5)) + return [(self.tstY,i) for i in range(5)] def testip3(self): """Test factory combining different subtests. @@ -281,11 +281,11 @@ if __name__ == '__main__': A single setUp() call is made for all the tests returned by this method. """ - return ((self.tstXX,i,i+1) for i in range(5)) + return [(self.tstXX,i,i+1) for i in range(5)] def testsp2(self): """Another shared parametric test factory""" - return ((self.tstYY,i) for i in range(5)) + return [(self.tstYY,i) for i in range(5)] def testsp3(self): """Another shared parametric test factory. @@ -293,7 +293,7 @@ if __name__ == '__main__': This one simply calls the same test multiple times, without any arguments. Note that you must still return tuples, even if there are no arguments.""" - return ((self.tstZZ,) for i in range(10)) + return [(self.tstZZ,) for i in range(10)] # This test class runs normally under unittest's default runner |