Skip to content

Commit 3f0dc30

Browse files
authored
Merge pull request danpaquin#326 from alimcmaster1/fix-ci
Get CI tests workings
2 parents 2711b68 + 285fc2f commit 3f0dc30

File tree

6 files changed

+25
-8
lines changed

6 files changed

+25
-8
lines changed

.coveragerc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[run]
2+
branch = True
3+
source =
4+
.
5+
omit =
6+
.tox/*
7+
setup.py
8+
tests/*

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ cache: pip
55
python: 3.5
66

77
install:
8-
- pip install -r requirements.txt
8+
- pip install -r requirements-dev.txt
99

1010
script:
11-
- pytest
11+
- python -m pytest tests/

pytest.ini

Lines changed: 0 additions & 3 deletions
This file was deleted.

requirements.txt renamed to requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ six==1.10.0
44
websocket-client==0.40.0
55
pymongo==3.5.1
66
pytest>=3.3.0
7+
python-dateutil>=2.7.3

tests/test_authenticated_client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ def test_place_order_input_1(self, dc):
2121
def test_place_order_input_2(self, dc):
2222
with pytest.raises(ValueError):
2323
r = dc.place_order('BTC-USD', 'buy', 'limit',
24-
cancel_after='123', tif='ABC')
24+
cancel_after='123', time_in_force='ABC')
2525

2626
def test_place_order_input_3(self, dc):
2727
with pytest.raises(ValueError):
2828
r = dc.place_order('BTC-USD', 'buy', 'limit',
29-
post_only='true', tif='FOK')
29+
post_only='true', time_in_force='FOK')
3030

3131
def test_place_order_input_4(self, dc):
3232
with pytest.raises(ValueError):
@@ -43,7 +43,7 @@ def test_place_order_input_5(self, dc):
4343
def client():
4444
"""Client that connects to sandbox API. Relies on authentication information
4545
provided in api_config.json"""
46-
with open('api_config.json') as file:
46+
with open('api_config.json.example') as file:
4747
api_config = json.load(file)
4848
c = AuthenticatedClient(
4949
api_url='https://api-public.sandbox.pro.coinbase.com', **api_config)
@@ -68,6 +68,7 @@ def client():
6868

6969

7070
@pytest.mark.usefixtures('dc')
71+
@pytest.mark.skip(reason="these test require authentication")
7172
class TestAuthenticatedClient(object):
7273
"""Test the authenticated client by validating basic behavior from the
7374
sandbox exchange."""

tox.ini

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[tox]
2+
envlist = py27, py35, py36
3+
4+
[testenv]
5+
setenv = PYTHONPATH = .
6+
deps =
7+
-rrequirements-dev.txt
8+
commands=
9+
python -m pytest -m "not xfail" {posargs: "{toxinidir}/cbpro/tests" --cov-config="{toxinidir}/tox.ini" --cov=cbpro}
10+
python -m pytest -m "xfail" {posargs: "{toxinidir}/cbpro/tests"

0 commit comments

Comments
 (0)