Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Several changes to bring testing up to speed. #78

Closed
wants to merge 3 commits into from

3 participants

@issackelly
  1. Tox: Use official 1.3, and start testing against trunk.
  2. Runtests: Make a default engine so that settings passes
  3. Runtests: Use class based test runner
  4. Docs: Add README.txt to _static folder, so it's created, this tox allows tests to pass.
@issackelly issackelly Several changes to bring testing up to speed.
1. Tox: Use official 1.3, and start testing against trunk. 
2. Runtests: Make a default engine so that settings passes
3. Runtests: Use class based test runner
4. Docs: Add README.txt to _static folder, so it's created, this tox allows tests to pass.
f4dc6b2
taggit/tests/runtests.py
@@ -7,6 +7,9 @@ from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='sqlite3',
+ DATABASES = {
+ 'default': {'ENGINE': 'django.db.backends.sqlite3'}
@alex Owner
alex added a note

Please format this so that all keys in the dict are on their own line, the same was the DATABASES dict as a whole is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@alex alex commented on the diff
taggit/tests/runtests.py
@@ -14,7 +17,7 @@ if not settings.configured:
]
)
-from django.test.simple import run_tests
+from django.test.simple import DjangoTestSuiteRunner
@alex Owner
alex added a note

Is this compatible with older djangos?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
issackelly added some commits
@issackelly issackelly Database keys on their own line. 264fc6f
@issackelly issackelly This didn't work as a thing, it throws a warning that README.txt isn'…
…t used in any toctrees, which is treated as an error in tox. Using an empty non-text file suffices though.
8793cae
@apollo13
Collaborator

I've just yanked tox and enabled travis, will think of reenabling tox again after we got a stable release :)

@apollo13 apollo13 closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 11, 2011
  1. @issackelly

    Several changes to bring testing up to speed.

    issackelly authored
    1. Tox: Use official 1.3, and start testing against trunk. 
    2. Runtests: Make a default engine so that settings passes
    3. Runtests: Use class based test runner
    4. Docs: Add README.txt to _static folder, so it's created, this tox allows tests to pass.
  2. @issackelly
  3. @issackelly

    This didn't work as a thing, it throws a warning that README.txt isn'…

    issackelly authored
    …t used in any toctrees, which is treated as an error in tox. Using an empty non-text file suffices though.
This page is out of date. Refresh to see the latest.
View
0  docs/_static/not-a.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
10 taggit/tests/runtests.py
@@ -7,6 +7,11 @@
if not settings.configured:
settings.configure(
DATABASE_ENGINE='sqlite3',
+ DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3'
+ }
+ },
INSTALLED_APPS=[
'django.contrib.contenttypes',
'taggit',
@@ -14,7 +19,7 @@
]
)
-from django.test.simple import run_tests
+from django.test.simple import DjangoTestSuiteRunner
@alex Owner
alex added a note

Is this compatible with older djangos?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
def runtests(*test_args):
@@ -26,7 +31,8 @@ def runtests(*test_args):
"..",
)
sys.path.insert(0, parent)
- failures = run_tests(test_args, verbosity=1, interactive=True)
+ runner = DjangoTestSuiteRunner()
+ failures = runner.run_tests(test_args, verbosity=1, interactive=True)
sys.exit(failures)
View
40 tox.ini
@@ -1,39 +1,65 @@
[tox]
envlist =
- py24, py25, py26, py27, pypy, py24-trunk, py25-trunk, py26-trunk, py27-trunk, pypy-trunk, docs
+ py24, py25, py26, py27, pypy, py24-13, py25-13, py26-13, py27-13, pypy-13, py24-trunk, py25-trunk, py26-trunk, py27-trunk, pypy-trunk, docs
[testenv]
commands =
python setup.py test
deps =
- django==1.2.4
+ django==1.2.5
# We lied here, these are not really trunk, but rather the 1.3 beta-1, which
# is close enough.
+[testenv:py24-13]
+basepython = python2.4
+deps =
+ django==1.3
+
+[testenv:py25-13]
+basepython = python2.5
+deps =
+ django==1.3
+
+[testenv:py26-13]
+basepython = python2.6
+deps =
+ django==1.3
+
+[testenv:py27-13]
+basepython = python2.7
+deps =
+ django==1.3
+
+[testenv:pypy-13]
+basepython = pypy
+deps =
+ django==1.3
+
+# Not the official trunk, but good as long as github holds out.
[testenv:py24-trunk]
basepython = python2.4
deps =
- http://www.djangoproject.com/download/1.3-rc-1/tarball/
+ https://github.com/django/django/tarball/master
[testenv:py25-trunk]
basepython = python2.5
deps =
- http://www.djangoproject.com/download/1.3-rc-1/tarball/
+ https://github.com/django/django/tarball/master
[testenv:py26-trunk]
basepython = python2.6
deps =
- http://www.djangoproject.com/download/1.3-rc-1/tarball/
+ https://github.com/django/django/tarball/master
[testenv:py27-trunk]
basepython = python2.7
deps =
- http://www.djangoproject.com/download/1.3-rc-1/tarball/
+ https://github.com/django/django/tarball/master
[testenv:pypy-trunk]
basepython = pypy
deps =
- http://www.djangoproject.com/download/1.3-rc-1/tarball/
+ https://github.com/django/django/tarball/master
[testenv:docs]
changedir = docs
Something went wrong with that request. Please try again.