Skip to content

Commit

Permalink
1% Crushed
Browse files Browse the repository at this point in the history
  • Loading branch information
super3 committed Jun 1, 2015
1 parent fd8670d commit f6931ff
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_Challenge.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,23 @@ def test_challenge(self):
self.assertTrue(chal.pick_seed() in chal.get_seeds())

def test_shard(self):
# only making sure this doesn't error out
addr = '191GVvAaTRxLmz3rW3nU5jAV1rF186VxQc'
chal = Challenge(addr, 100, 10*1024*1024) # 10 MB
seed = chal.pick_seed()
path = chal.gen_shard(seed, 'data/')
os.remove(path)

def test_gen_challenge(self):
# only making sure this doesn't error out
addr = '191GVvAaTRxLmz3rW3nU5jAV1rF186VxQc'
chal = Challenge(addr, 100, 10*1024*1024) # 10 MB
path = chal.gen_challenge('data/')[1]
os.remove(path)

def test_pick_seed(self):
addr = '191GVvAaTRxLmz3rW3nU5jAV1rF186VxQc'
chal = Challenge(addr, 100, 50)
self.assertTrue(chal.pick_seed() in chal.seed_list)
res = '66357e60899acae95ce1e31def3d7b32a73d34b2f12ece73cdca025a26e17e32'
self.assertTrue(chal.pick_seed(0), res)

0 comments on commit f6931ff

Please sign in to comment.