Skip to content
This repository has been archived by the owner on Dec 23, 2018. It is now read-only.

Commit

Permalink
Restructured testing stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephrdev committed Apr 17, 2013
1 parent 6afaa47 commit 134fada
Show file tree
Hide file tree
Showing 25 changed files with 31 additions and 5 deletions.
4 changes: 4 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), 'tests'))
3 changes: 2 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[pytest]
addopts = -v --tb=short --pep8 --flakes --cov=userprofiles/ --cov-report=term-missing --cov-report=html userprofiles/
addopts = -v --tb=short --pep8 --flakes --cov=userprofiles/ --cov-report=term-missing --cov-report=html userprofiles/ tests/
norecursedirs = test_project
pep8ignore =
*.py E501 E128

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 0 additions & 4 deletions test_project/settings.py → tests/test_project/settings.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import os

TEST_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__),
'..', 'userprofiles', 'tests'))

TEST_RUNNER = 'discover_runner.DiscoverRunner'

DATABASES = {
'default': {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
25 changes: 25 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[tox]
envlist =
django1.5-py27, django1.6-py27

indexserver =
default = https://simple.crate.io
downloadcache = ~/.pip/cache/

[testenv]
deps =
-r{toxinidir}/tests/test_project/requirements.txt
commands =
py.test

[testenv:django1.5-py27]
basepython = python2.7
deps =
Django==1.5.1
{[testenv]deps}

[testenv:django1.6-py27]
basepython = python2.7
deps =
https://github.com/django/django/zipball/master
{[testenv]deps}
Empty file removed userprofiles/tests/__init__.py
Empty file.

0 comments on commit 134fada

Please sign in to comment.