Skip to content

Commit

Permalink
Remove tox and just use pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
hakbailey committed Mar 22, 2019
1 parent 71e7100 commit 59f1eae
Show file tree
Hide file tree
Showing 7 changed files with 432 additions and 445 deletions.
6 changes: 0 additions & 6 deletions .coveragerc

This file was deleted.

17 changes: 9 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ dist: xenial
language: python
python: 3.7
env:
- TOX_ENV=py37
- TOX_ENV=coverage
- PIPENV_IGNORE_VIRTUALENVS=1
- BOTO_CONFIG=/dev/null
before_install:
- sudo apt-get install -y libxmlsec1-dev
- export BOTO_CONFIG=/dev/null
- sudo rm -f /etc/boto.cfg
- pip install pipenv coveralls
install:
- pip install tox coveralls
script:
- tox -e $TOX_ENV
after_success:
- coveralls
- pipenv install --dev
jobs:
include:
- name: Tests
script: pipenv run pytest --cov=ebooks tests/
after_success: coveralls
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ webtest = "*"
flask-webtest = "*"
requests-mock = "*"
moto = "*"
pytest-env = "*"

[requires]
python_version = "3.7"
811 changes: 411 additions & 400 deletions Pipfile.lock

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[pytest]
env =
FLASK_DEBUG=True
PIPENV_DONT_LOAD_ENV=1
BOTO_CONFIG=/dev/null
ALEPH_API_KEY=fake_aleph_key
AWS_ACCESS_KEY_ID=fake_access_key_id
AWS_SECRET_ACCESS_KEY=fake_secret_access_key
AWS_BUCKET_NAME=samples
SECRET_KEY=supersecret
2 changes: 1 addition & 1 deletion tests/test_views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
def test_item_page_redirects_if_not_authenticated(testapp):
response = testapp.get('/item/sample-monograph')
assert response.status_code == 302
assert 'next=http%3A%2F%2Flocalhost%3A80%2Fitem%2Fsample-monograph' \
assert 'next=http%3A%2F%2Flocalhost%2Fitem%2Fsample-monograph' \
in response.location


Expand Down
30 changes: 0 additions & 30 deletions tox.ini

This file was deleted.

0 comments on commit 59f1eae

Please sign in to comment.