Skip to content
This repository has been archived by the owner on Aug 24, 2019. It is now read-only.

Commit

Permalink
Drop Python<3.5 and nosetests
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Aug 31, 2016
1 parent 2384aa2 commit 9a910e7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 26 deletions.
11 changes: 2 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,10 @@ env:
global:
- BLUEBERRYPY_CONFIG='{}'

# At least one build per one of the following variable
matrix:
- TOX_ENV=py34-codestyle,py34-pytest
- TOX_ENV=py35-codestyle,py35-pytest

# Run tests
script:
- make TOX_ARGS="-e $TOX_ENV" test-envs
script: make test-envs

after_success:
- bash <(curl -s https://codecov.io/bash)
after_success: bash <(curl -s https://codecov.io/bash)

notifications:
webhooks:
Expand Down
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ NPM=npm
PRECOMMIT=$(PENV_BIN_PATH)pre-commit
BLUEBERRY=$(PENV_BIN_PATH)blueberrypy serve -b
TOX=$(PENV_BIN_PATH)tox
NOSE=$(PENV_BIN_PATH)nosetests
USER_SHELL=/bin/zsh
ACTIVATE_ENV=if test -d ./$(PENV); then . ./$(PENV)/bin/activate; fi; if test -f ./.exports; then . ./.exports; fi
USE_NVM=if test -d ~/.nvm; then . ~/.nvm/nvm.sh; nvm use 5.0.0 ; fi
Expand Down Expand Up @@ -98,18 +97,14 @@ migration:
git add src/db/versions && \
git commit -m "$(COMMIT_MSG)"

test: test-nose test-style
test: test-pytest test-style
@$(ACTIVATE_ENV) ; \
python --version

test-envs: test-env
@$(ACTIVATE_ENV) ; \
BLUEBERRYPY_CONFIG='{}' $(TOX) $(TOX_ARGS)

test-nose: test-deps
@$(ACTIVATE_ENV) ; \
BLUEBERRYPY_CONFIG='{}' NOSE_TESTCONFIG_AUTOLOAD_YAML=config/test/app.yml $(NOSE) -w src/tests --tests=test_api,test_utils,test_validation,test_auth_controller --with-coverage --cover-package=GDGUkraine --cover-xml

test-pytest: test-deps
@$(ACTIVATE_ENV) ; \
BLUEBERRYPY_CONFIG='{}' NOSE_TESTCONFIG_AUTOLOAD_YAML=config/test/app.yml py.test -v src/tests/test_{utils,api,validation,auth_controller}.py --cov
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ This is the event registration system for GDG Ukraine events.

## Requirements:

Python 3.5.0 (it is recommended to use pyenv for dev environment)
NodeJS 5.0.0 (it is recommended to use nvm for dev environment)
Python 3.5+ (it is recommended to use pyenv for dev environment)
NodeJS 5.0+ (it is recommended to use nvm for dev environment)
MySQL (MariaDB works well)
Mercurial (because there's some `hg+` dependencies)

Expand Down Expand Up @@ -84,10 +84,6 @@ You can use [`tox`](https://tox.readthedocs.org) to run tests as well. Unfortuna

$ make test-envs

You can also run only specific set of tests. To do that, add `-e toxenv[,toxenv]` to tox comand. For example, to run tests only for python3.5, use the following command:

$ make TOX_ARGS="-e py35-codestyle,py35-nosetests" test-envs

## Enabling env
If you for some reason need to run shell with env activated, run this:

Expand Down
1 change: 0 additions & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-r test-env.txt
-r common.txt
hg+https://[email protected]/webknjaz/blueberrypy-wk#egg=blueberrypy[speedups,dev]
ipdbplugin==1.4.3 # enables nosetests --ipdb
5 changes: 1 addition & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,24 @@ exclude = .git,__pycache,*/migrations/*,*/db/versions/*


[tox]
envlist = py{34,35}-{codestyle,nosetests,pytest}
envlist = py35-{codestyle,pytest}
ignore_errors=True


[testenv]
basepython=
py34: python3.4
py35: python3.5

commands=
python --version
codestyle: pre-commit run --all-files
nosetests: nosetests -w src/tests --tests=test_utils,test_validation,test_api,test_auth_controller --with-coverage --cover-package=GDGUkraine --cover-xml
pytest: py.test -v src/tests/test_auth_controller.py src/tests/test_utils.py src/tests/test_api.py src/tests/test_validation.py --cov


deps=
-rrequirements/test.txt

envdir=
py34: {toxworkdir}/py34
py35: {toxworkdir}/py35

setenv=
Expand Down

0 comments on commit 9a910e7

Please sign in to comment.