diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-02-25 11:09:54 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-03-05 16:52:49 +0100 |
| commit | 02bbb30efea4980c9d133947cbbf69fb599071ad (patch) | |
| tree | 3fea6826fcc5354840a27cb1dc99ff31eef81896 /test/utils/testset.py | |
| parent | eab809932871f91d6f4aa770fc321af9e156e0f5 (diff) | |
| download | miasm-02bbb30efea4980c9d133947cbbf69fb599071ad.tar.gz miasm-02bbb30efea4980c9d133947cbbf69fb599071ad.zip | |
Support python2/python3
Diffstat (limited to 'test/utils/testset.py')
| -rw-r--r-- | test/utils/testset.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/utils/testset.py b/test/utils/testset.py index 7b60e836..eee0e6f7 100644 --- a/test/utils/testset.py +++ b/test/utils/testset.py @@ -1,10 +1,12 @@ +from __future__ import print_function +from builtins import range import os import subprocess import sys import time from multiprocessing import cpu_count, Queue, Process -from test import Test +from .test import Test class Message(object): @@ -136,7 +138,7 @@ class TestSet(object): if len(self.tests) == 0: # Poison pills - for _ in xrange(self.cpu_c): + for _ in range(self.cpu_c): self.todo_queue.put(None) # All tasks done @@ -201,7 +203,7 @@ class TestSet(object): try: os.remove(product) except OSError: - print "Cleanning error: Unable to remove %s" % product + print("Cleanning error: Unable to remove %s" % product) def add_additional_args(self, args): """Add arguments to used on the test command line @@ -218,7 +220,7 @@ class TestSet(object): # Launch workers processes = [] - for _ in xrange(self.cpu_c): + for _ in range(self.cpu_c): p = Process(target=TestSet.worker, args=(self.todo_queue, self.message_queue, self.additional_args)) |