projects
/
tools
/
bmap-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49394ca
)
tests: helpers: a small nicification
author
Artem Bityutskiy
<artem.bityutskiy@intel.com>
Wed, 28 Nov 2012 08:37:02 +0000
(10:37 +0200)
committer
Artem Bityutskiy
<artem.bityutskiy@intel.com>
Wed, 28 Nov 2012 09:15:55 +0000
(11:15 +0200)
getrandbits(1) is a bit more clever than randint(0, 1). Also, remove useless
bool().
Change-Id: I169c21f8e986dd6579a46d6eb0b214ec7e11611a
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
tests/helpers.py
patch
|
blob
|
history
diff --git
a/tests/helpers.py
b/tests/helpers.py
index
45e03c3
..
a72130c
100644
(file)
--- a/
tests/helpers.py
+++ b/
tests/helpers.py
@@
-27,7
+27,7
@@
def create_random_sparse_file(file_obj, size):
become a hole. Returns 'True' if the block was mapped and 'False'
otherwise. """
- map_the_block =
bool(random.randint(0, 1)
)
+ map_the_block =
random.getrandbits(1
)
if map_the_block:
file_obj.seek(block * block_size)