Skip to content

Commit

Permalink
Add travis
Browse files Browse the repository at this point in the history
  • Loading branch information
eun2ce committed Jun 11, 2019
1 parent 08def55 commit ab10114
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: python
python:
- "2.6"
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.5-dev" # 3.5 development branch
- "3.6"
- "3.6-dev" # 3.6 development branch
install:
- pip install -r requirements.txt
script:
- pytest test.py
2 changes: 2 additions & 0 deletions example.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import pytest

from bclib import bancor

bancor_1 = bancor(300000, 1, 0.2)
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==3.0.2
9 changes: 9 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import pytest

from bclib import bancor

bancor_test = bancor(300000, 1, 0.2)
assert bancor_test.issue_by_reserve_token(300) == 299.40179372385245
assert bancor_test.issue_by_reserve_token(700) == 693.9974382206417
assert bancor_test.destroy_by_reserve_token(1302) == 1307.966524590907
assert bancor_test.issue_by_reserve_token(100) == 100.34530853232869

0 comments on commit ab10114

Please sign in to comment.