Skip to content

Commit

Permalink
fix(test): use range instead of xrange
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Styk <[email protected]>
  • Loading branch information
StykMartin committed Oct 28, 2024
1 parent 8605496 commit b11388a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion LabController/src/bkr/labcontroller/test_concurrency.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def _test():
def test_reaper_race(self):
def _test():
procs = [MonitoredSubprocess(['true'], timeout=10)
for _ in xrange(600)]
for _ in range(600)]
for p in procs:
p.dead.wait()

Expand Down
6 changes: 3 additions & 3 deletions LabController/src/bkr/labcontroller/test_netboot.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ def setUp(self):
super(ImagesBaseTestCase, self).setUp()
# make some dummy images
self.kernel = tempfile.NamedTemporaryFile(prefix='test_netboot', suffix='kernel')
for _ in xrange(4 * 1024):
for _ in range(4 * 1024):
self.kernel.write(chr(random.randrange(0, 256)) * 1024)
self.kernel.flush()
self.initrd = tempfile.NamedTemporaryFile(prefix='test_netboot', suffix='initrd')
for _ in xrange(8 * 1024):
for _ in range(8 * 1024):
self.initrd.write(chr(random.randrange(0, 256)) * 1024)
self.initrd.flush()
self.image = tempfile.NamedTemporaryFile(prefix='test_netboot', suffix='image')
for _ in xrange(4 * 1024):
for _ in range(4 * 1024):
self.image.write(chr(random.randrange(0, 256)) * 1024)
self.image.flush()

Expand Down

0 comments on commit b11388a

Please sign in to comment.