Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue 21] Migrate to pytest #30

Merged
merged 17 commits into from
Oct 12, 2017
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ venv*
*.prof
*.orig
results.txt

.cache/
6 changes: 2 additions & 4 deletions forkchoice.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import settings as s
import random as r
import copy
import utils


def get_max_weight_indexes(scores):
Expand Down Expand Up @@ -34,7 +31,8 @@ def get_fork_choice(last_finalized_block, children, latest_messages):
curr_scores[child] = scores.get(child, 0)
max_score = max(curr_scores[child], max_score)

# we don't choose weight 0 children. Also possible to make non-deterministic decision here.
# we don't choose weight 0 children.
# Also possible to make non-deterministic decision here.
if max_score == 0:
break

Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ pickleshare==0.7.4
Pillow==4.3.0
prompt-toolkit==1.0.15
ptyprocess==0.5.2
py==1.4.34
Pygments==2.2.0
pyparsing==2.2.0
pytest==3.2.3
python-dateutil==2.6.1
pytz==2017.2
scandir==1.6
Expand Down
81 changes: 0 additions & 81 deletions test/test_block.py

This file was deleted.

127 changes: 0 additions & 127 deletions test/test_forkchoice.py

This file was deleted.

59 changes: 0 additions & 59 deletions test/test_safety_oracle.py

This file was deleted.

49 changes: 0 additions & 49 deletions test/test_utils.py

This file was deleted.

File renamed without changes.
Loading