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

use pytest (bug 1090184) #369

Merged
merged 1 commit into from Dec 9, 2014
Jump to file or symbol
Failed to load files and symbols.
+1,702 −476
Diff settings

Always

Just for now

View
@@ -46,3 +46,6 @@ media/marketplace-stats
*.po~
site-static/*
user-media/*
.tox/
.cache/
MANIFEST
View
@@ -1,22 +1,24 @@
language: python
python:
- "2.6"
- "2.7"
env:
- TOX_ENV=flake8
- TOX_ENV=docs
- TOX_ENV=es
- TOX_ENV=addons-devhub-editors
- TOX_ENV=main
services:
- memcached
before_install:
- sudo apt-get install swig
- wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.2.deb && sudo dpkg -i elasticsearch-1.3.2.deb
- sudo /usr/share/elasticsearch/bin/elasticsearch -d -D es.path.data=/tmp -D es.gateway.type=none -D es.index.store.type=memory -D es.discovery.zen.ping.multicast.enabled=false
install:
- make update_deps
- npm install
- pip install tox
before_script:
- mysql -e 'create database olympia;'
- make update_assets
script:
- DJANGO_SETTINGS_MODULE=settings_ci make flake8 && DJANGO_SETTINGS_MODULE=settings_ci make test
- make docs SPHINXOPTS='-nW'
- tox -v -e $TOX_ENV --recreate
notifications:
irc:
channels:
View
@@ -1,4 +1,4 @@
.PHONY: help docs test test_force_db tdd test_failed initialize_db populate_data update_code update_deps update_db update_assets full_init full_update reindex flake8
.PHONY: help docs test test_es test_no_es test_force_db tdd test_failed initialize_db populate_data update_code update_deps update_db update_assets full_init full_update reindex flake8
NUM_ADDONS=10
NUM_THEMES=$(NUM_ADDONS)
@@ -26,16 +26,22 @@ docs:
$(MAKE) -C docs html
test:
REUSE_DB=1 python manage.py test --with-blockage --noinput --logging-clear-handlers --with-id -v 2 $(ARGS)
py.test $(ARGS)
test_es:
py.test -m es_tests $(ARGS)
test_no_es:
py.test -m "not es_tests" $(ARGS)
test_force_db:
python manage.py test --with-blockage --noinput --logging-clear-handlers --with-id -v 2 $(ARGS)
py.test --create-db $(ARGS)
tdd:
REUSE_DB=1 python manage.py test --with-blockage --noinput --failfast --pdb --with-id -v 2 $(ARGS)
py.test -x --pdb $(ARGS)
test_failed:
REUSE_DB=1 python manage.py test --with-blockage --noinput --logging-clear-handlers --with-id -v 2 --failed $(ARGS)
py.test --lf $(ARGS)
initialize_db:
python manage.py reset_db
View
@@ -1,6 +1,7 @@
from django.http import HttpRequest
import mock
import pytest
from nose.tools import assert_false
import amo
@@ -14,6 +15,9 @@
match_rules)
pytestmark = pytest.mark.django_db
def test_match_rules():
"""
Unit tests for the match_rules method.
Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.