Skip to content

Commit

Permalink
Merge pull request #4456 from grimadas/devel
Browse files Browse the repository at this point in the history
Fix test boostap
  • Loading branch information
xoriole authored Apr 9, 2019
2 parents e96d2f1 + 9c0cb4b commit 04d5a28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 94 deletions.
7 changes: 3 additions & 4 deletions Tribler/Core/Utilities/bootstrap_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ def create_dummy_tdef(file_name, length=25, seed=42):
:param length: Length in MB, e.g. length=15 will generate file of 15 MB
:return: torrent def with test file
"""
if not os.path.exists(file_name):
random.seed(seed)
with open(file_name, 'wb') as fp:
fp.write(bytearray(random.getrandbits(8) for _ in xrange(length * 1024 * 1024)))
random.seed(seed)
with open(file_name, 'wb') as fp:
fp.write(bytearray(random.getrandbits(8) for _ in xrange(length * 1024 * 1024)))
tdef = TorrentDef()
tdef.add_content(file_name)
tdef.set_piece_length(2 ** 16)
Expand Down
90 changes: 0 additions & 90 deletions Tribler/Test/API/test_bootstrap.py

This file was deleted.

0 comments on commit 04d5a28

Please sign in to comment.