[Python-modules-commits] [django-nose] 01/14: Import django-nose_1.4.2.orig.tar.gz

Michael Fladischer fladi at moszumanska.debian.org
Fri Oct 16 16:43:31 UTC 2015


This is an automated email from the git hooks/post-receive script.

fladi pushed a commit to annotated tag debian/1.4.2-1
in repository django-nose.

commit 4ee0cc56a19788fb299a20d2f63e361a7caf0927
Author: Michael Fladischer <FladischerMichael at fladi.at>
Date:   Fri Oct 16 12:01:03 2015 +0200

    Import django-nose_1.4.2.orig.tar.gz
---
 .gitignore                                         |  21 +-
 .travis.yml                                        |  91 +++--
 AUTHORS.rst                                        |  58 +++
 CONTRIBUTING.rst                                   | 137 ++++++++
 MANIFEST.in                                        |  21 +-
 Makefile                                           |  78 +++++
 README.rst                                         | 389 ++-------------------
 changelog.rst                                      | 102 ++++++
 changelog.txt                                      |  28 --
 contribute.json                                    |   2 +-
 django_nose/__init__.py                            |  12 +-
 django_nose/fixture_tables.py                      |  42 ++-
 django_nose/management/__init__.py                 |   1 +
 django_nose/management/commands/__init__.py        |   1 +
 django_nose/management/commands/test.py            |   8 +-
 django_nose/plugin.py                              |  56 +--
 django_nose/runner.py                              |  96 ++---
 django_nose/testcases.py                           |  12 +-
 django_nose/tools.py                               | 106 +++---
 django_nose/utils.py                               |   8 +-
 docs/Makefile                                      | 177 ++++++++++
 .../management/__init__.py => docs/_static/.keep   |   0
 docs/authors.rst                                   |   1 +
 docs/changelog.rst                                 |   1 +
 docs/conf.py                                       | 263 ++++++++++++++
 docs/contributing.rst                              |   1 +
 docs/index.rst                                     |  29 ++
 docs/installation.rst                              |  33 ++
 docs/make.bat                                      | 242 +++++++++++++
 docs/upgrading.rst                                 |  51 +++
 README.rst => docs/usage.rst                       | 185 +---------
 manage.py                                          |  11 +
 requirements-rtd.txt                               |   4 +
 requirements.txt                                   |  46 +++
 runtests.sh                                        | 189 ++++++++--
 setup.cfg                                          |  19 +
 setup.py                                           |  40 ++-
 testapp/__init__.py                                |   1 +
 testapp/custom_runner.py                           |   4 +-
 testapp/fixtures/testdata.json                     |  19 +
 testapp/migrations/0001_initial.py                 |  42 +++
 testapp/migrations/__init__.py                     |   1 +
 testapp/models.py                                  |  32 ++
 testapp/plugin_t/test_with_plugins.py              |   2 +
 testapp/plugins.py                                 |   7 +-
 testapp/runtests.py                                |   9 +-
 testapp/settings.py                                |  48 ++-
 testapp/settings_old_style.py                      |  15 -
 testapp/settings_with_plugins.py                   |   6 -
 testapp/settings_with_south.py                     |   4 -
 testapp/south_migrations/0001_initial.py           |  54 +++
 testapp/south_migrations/__init__.py               |   1 +
 testapp/test_for_nose.py                           |   1 +
 testapp/test_only_this.py                          |   1 +
 testapp/tests.py                                   |  53 +++
 tox.ini                                            |  35 +-
 unittests/test_databases.py                        |  23 +-
 57 files changed, 2087 insertions(+), 832 deletions(-)

diff --git a/.gitignore b/.gitignore
index 0d9143e..5c9b3f8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,25 @@
-*.pyc
+# Python binaries
+*.py[cod]
+
+# Editor backups, OS files
 *.swp
 *~
-*.egg-info
 .DS_Store
+
+# Distutils cruft
+*.egg-info
+South-*.egg/
 build/
 dist/
+
+# Unit test / coverage reports
 .tox/
+.coverage
+.coverage.*
+.noseids
+nosetests.xml
+htmlcov/
+testapp.sqlite3
+
+# Sphinx documentation build
+docs/_build/*
diff --git a/.travis.yml b/.travis.yml
index f0012e1..68c5f29 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,52 +1,51 @@
 sudo: false
 language: python
-
-python:
-  - "2.6"
-  - "2.7"
-  - "3.2"
-  - "3.3"
-  - "3.4"
-  - "3.5"
-
 env:
-  - REQUIREMENTS=django-14
-  - REQUIREMENTS=django-16
-  - REQUIREMENTS=django-17
-  - REQUIREMENTS=django-18
-  - REQUIREMENTS=django-master
-
+    global:
+        - COVERAGE=1 RUNTEST_ARGS="-v --noinput"
+    matrix:
+        # Quality checks
+        - TOXENV=flake8
+        - TOXENV=docs
+        # Supported Python / Django versions w/ SQLite
+        - TOXENV=py27-django-19
+        - TOXENV=py34-django-19
+        - TOXENV=py27-django-18
+        - TOXENV=py34-django-18
+        - TOXENV=py27-django-17
+        - TOXENV=py34-django-17
+        - TOXENV=py26-django-14
+        - TOXENV=py27-django-14
+        # Test with PostgreSQL
+        - TOXENV=py27-django-19-postgres DATABASE_URL="postgres://postgres@localhost:5432/py27-django-19-postgres"
+        - TOXENV=py34-django-19-postgres DATABASE_URL="postgres://postgres@localhost:5432/py34-django-19-postgres"
+        - TOXENV=py27-django-18-postgres DATABASE_URL="postgres://postgres@localhost:5432/py27-django-18-postgres"
+        - TOXENV=py27-django-17-postgres DATABASE_URL="postgres://postgres@localhost:5432/py27-django-17-postgres"
+        - TOXENV=py27-django-14-postgres DATABASE_URL="postgres://postgres@localhost:5432/py27-django-14-postgres"
+        # Test with MySQL
+        - TOXENV=py27-django-19-mysql DATABASE_URL="mysql://travis@localhost:3306/py27-django-19-mysql"
+        - TOXENV=py34-django-19-mysql DATABASE_URL="mysql://travis@localhost:3306/py34-django-19-mysql"
+        - TOXENV=py27-django-18-mysql DATABASE_URL="mysql://travis@localhost:3306/py27-django-18-mysql"
+        - TOXENV=py27-django-17-mysql DATABASE_URL="mysql://travis@localhost:3306/py27-django-17-mysql"
+        - TOXENV=py27-django-14-mysql DATABASE_URL="mysql://travis@localhost:3306/py27-django-14-mysql"
+        # Django master is allowed to fail
+        - TOXENV=py27-django-master
+        - TOXENV=py34-django-master
+        - TOXENV=py27-django-master-mysql DATABASE_URL="mysql://travis@localhost:3306/py27-django-master-mysql"
+        - TOXENV=py34-django-master-postgres DATABASE_URL="postgres://postgres@localhost:5432/py34-django-master-postgres"
 matrix:
-  allow_failures:
-    - env: REQUIREMENTS=django-master
-  exclude:
-    - python: "2.6"
-      env: REQUIREMENTS=django-17
-    - python: "2.6"
-      env: REQUIREMENTS=django-18
-    - python: "2.6"
-      env: REQUIREMENTS=django-master
-    - python: "3.2"
-      env: REQUIREMENTS=django-14
-    - python: "3.2"
-      env: REQUIREMENTS=django-master
-    - python: "3.3"
-      env: REQUIREMENTS=django-14
-    - python: "3.3"
-      env: REQUIREMENTS=django-master
-    - python: "3.4"
-      env: REQUIREMENTS=django-14
-    - python: "3.5"
-      env: REQUIREMENTS=django-14
-    - python: "3.5"
-      env: REQUIREMENTS=django-16
-    - python: "3.5"
-      env: REQUIREMENTS=django-17
-    - python: "3.5"
-      env: REQUIREMENTS=django-18
+    allow_failures:
+        # Master is allowed to fail
+        - env: TOXENV=py27-django-master
+        - env: TOXENV=py34-django-master
+        - env: TOXENV=py27-django-master-mysql DATABASE_URL="mysql://travis@localhost:3306/py27-django-master-mysql"
+        - env: TOXENV=py34-django-master-postgres DATABASE_URL="postgres://postgres@localhost:5432/py34-django-master-postgres"
 
 install:
-  - pip install tox
-
-script:
-  - tox -e py-$REQUIREMENTS
+    - pip install tox coveralls
+before_script:
+    - coverage erase
+    - bash -c "if [[ \"$DATABASE_URL\" == postgres* ]]; then psql -c 'create database \"$TOXENV\";' -U postgres; fi"
+    - bash -c "if [[ \"$DATABASE_URL\" == mysql* ]]; then mysql -e 'create database IF NOT EXISTS \`$TOXENV\`;'; fi"
+script: tox
+after_success: coveralls
diff --git a/AUTHORS.rst b/AUTHORS.rst
new file mode 100644
index 0000000..4b0e627
--- /dev/null
+++ b/AUTHORS.rst
@@ -0,0 +1,58 @@
+=======
+Credits
+=======
+
+**django-nose** was created by Jeff Balogh in 2009, which is a really long time
+ago in the Django world.  It keeps running because of the contributions of
+volunteers.  Thank you to everyone who uses django-nose, keeps your projects
+up-to-date, files detailed bugs, and submits patches.
+
+Maintainers
+-----------
+* Jeff Balogh (`jbalogh <https://github.com/jbalogh>`_)
+* Erik Rose (`erikrose <https://github.com/erikrose>`_)
+* James Socol (`jscol <https://github.com/jsocol>`_)
+* Rob Hudson (`robhudson <https://github.com/robhudson>`_)
+* John Whitlock (`jwhitlock <https://github.com/jwhitlock>`_)
+
+Contributors
+------------
+These non-maintainers have contributed code to a django-nose release:
+
+* Adam DePue (`adepue <https://github.com/adepue>`_)
+* Alexey Evseev (`st4lk <https://github.com/st4lk>`_)
+* Alex (`alexjg <https://github.com/alexjg>`_)
+* Antti Kaihola (`akaihola <https://github.com/akaihola>`_)
+* Ash Christopher (`ashchristopher <https://github.com/ashchristopher>`_)
+* Blake Winton (`bwinton <https://github.com/bwinton>`_)
+* Brad Pitcher (`brad <https://github.com/brad>`_)
+* Camilo Nova (`camilonova <https://github.com/camilonova>`_)
+* Carl Meyer (`carljm <https://github.com/carljm>`_)
+* Conrado Buhrer (`conrado <https://github.com/conrado>`_)
+* David Baumgold (`singingwolfboy <https://github.com/singingwolfboy>`_)
+* David Cramer (`dcramer <https://github.com/dcramer>`_)
+* Dmitry Gladkov (`dgladkov <https://github.com/dgladkov>`_)
+* Ederson Mota (`edrmp <https://github.com/edrmp>`_)
+* Eric Zarowny (`ezarowny <https://github.com/ezarowny>`_)
+* Eron Villarreal (`eroninjapan <https://github.com/eroninjapan>`_)
+* Fred Wenzel (`fwenzel <https://github.com/fwenzel>`_)
+* Fábio Santos (`fabiosantoscode <https://github.com/fabiosantoscode>`_)
+* Ionel Cristian Mărieș (`ionelmc <https://github.com/ionelmc>`_)
+* Johan Euphrosine (`proppy <https://github.com/proppy>`_)
+* Kyle Robertson (`dvelyk <https://github.com/dvelyk>`_)
+* Marius Gedminas (`mgedmin <https://github.com/mgedmin>`_)
+* Martin Chase (`outofculture <https://github.com/outofculture>`_)
+* Matthias Bauer (`moeffju <https://github.com/moeffju>`_)
+* Michael Elsdörfer (`miracle2k <https://github.com/miracle2k>`_)
+* Michael Kelly (`Osmose <https://github.com/Osmose>`_)
+* Peter Baumgartner (`ipmb <https://github.com/ipmb>`_)
+* Radek Simko (`radeksimko <https://github.com/radeksimko>`_)
+* Ramiro Morales (`ramiro <https://github.com/ramiro>`_)
+* Rob Madole (`robmadole <https://github.com/robmadole>`_)
+* Roger Hu (`rogerhu <https://github.com/rogerhu>`_)
+* Ross Lawley (`rozza <https://github.com/rozza>`_)
+* Scott Sexton (`scottsexton <https://github.com/scottsexton>`_)
+* Stephen Burrows (`melinath <https://github.com/melinath>`_)
+* Sverre Johansen (`sverrejoh <https://github.com/sverrejoh>`_)
+* Tim Child (`timc3 <https://github.com/timc3>`_)
+* Yegor Roganov (`roganov <https://github.com/roganov>`_)
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
new file mode 100644
index 0000000..2b3c4ac
--- /dev/null
+++ b/CONTRIBUTING.rst
@@ -0,0 +1,137 @@
+============
+Contributing
+============
+
+Contributions are welcome, and they are greatly appreciated! Every
+little bit helps, and credit will always be given.
+
+You can contribute in many ways:
+
+Types of Contributions
+----------------------
+
+Report Bugs
+~~~~~~~~~~~
+
+Report bugs at https://github.com/django-nose/django-nose/issues.
+
+If you are reporting a bug, please include:
+
+* The version of django, nose, and django-nose you are using, and any other
+  applicable packages (``pip freeze`` will show current versions)
+* Any details about your local setup that might be helpful in troubleshooting.
+* Detailed steps to reproduce the bug.
+
+When someone submits a pull request to fix your bug, please try it out and
+report if it worked for you.
+
+Fix Bugs
+~~~~~~~~
+
+Look through the GitHub issues for bugs. Anything untagged or tagged with "bug"
+is open to whoever wants to implement it.
+
+Implement Features
+~~~~~~~~~~~~~~~~~~
+
+Look through the GitHub issues for features. Anything untagged ot tagged with
+"feature" is open to whoever wants to implement it.
+
+django-nose is built on nose, which supports plugins.  Consider implementing
+your feature as a plugin, maintained by the community using that feature,
+rather than adding to the django-nose codebase.
+
+Write Documentation
+~~~~~~~~~~~~~~~~~~~
+
+django-nose could always use more documentation, whether as part of the
+official django-nose, as code comments, or even on the web in blog posts,
+articles, and such.
+
+Submit Feedback
+~~~~~~~~~~~~~~~
+
+The best way to send feedback is to file an issue at 
+https://github.com/django-nose/django-nose/issues.
+
+If you are proposing a feature:
+
+* Explain in detail how it would work.
+* Keep the scope as narrow as possible, to make it easier to implement.
+* Remember that this is a volunteer-driven project, and that contributions
+  are welcome :)
+
+Get Started!
+------------
+
+Ready to contribute? Here's how to set up django-nose
+for local development.
+
+1. Fork the `django-nose` repo on GitHub.
+2. Clone your fork locally::
+
+    $ git clone git at github.com:your_name_here/django-nose.git
+
+3. Install your local copy into a virtualenv. Assuming you have
+   virtualenvwrapper installed, this is how you set up your fork for local
+   development::
+
+    $ mkvirtualenv django-nose
+    $ cd django-nose/
+    $ pip install -r requirements.txt
+    $ ./manage.py migrate
+
+4. Create a branch for local development::
+
+    $ git checkout -b name-of-your-bugfix-or-feature
+
+   Now you can make your changes locally.
+
+5. Make sure existing tests continue to pass with your new code::
+
+   $ make qa
+
+6. When you're done making changes, check that your changes pass flake8 and the
+   tests, including testing other Python versions with tox::
+
+    $ make qa-all
+
+6. Commit your changes and push your branch to GitHub::
+
+    $ git add .
+    $ git commit -m "Your detailed description of your changes."
+    $ git push origin name-of-your-bugfix-or-feature
+
+7. Submit a pull request through the GitHub website.
+
+Pull Request Guidelines
+-----------------------
+
+Before you submit a pull request, check that it meets these guidelines:
+
+1. The pull request should be in a branch.
+2. The pull request should include tests.
+3. You agree to license your contribution under the BSD license.
+4. If the pull request adds functionality, the docs should be updated.
+5. Make liberal use of `git rebase` to ensure clean commits on top of master.
+6. The pull request should pass QA tests and work for supported Python / Django
+   combinations.  Check
+   https://travis-ci.org/django-nose/django-nose/pull_requests
+   and make sure that the tests pass for all supported Python versions.
+
+Tips
+----
+
+The django-nose testapp uses django-nose, so all of the features are available.
+To run a subset of tests::
+
+    $ ./manage.py test testapp/tests.py
+
+To mark failed tests::
+
+    $ ./manage.py test --failed
+
+To re-run only the failed tests::
+
+    $ ./manage.py test --failed
+
diff --git a/MANIFEST.in b/MANIFEST.in
index 974923d..3116c01 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,7 +1,20 @@
+include AUTHORS.rst
+include CONTRIBUTING.rst
 include LICENSE
+include Makefile
 include README.rst
+include changelog.rst
+include contribute.json
+include manage.py
+include requirements.txt
+include requirements-rtd.txt
 include runtests.sh
-include changelog.txt
-recursive-exclude django_nose *.py[co]
-recursive-include testapp *
-recursive-exclude testapp *.py[co]
+
+recursive-include docs Makefile conf.py *.rst make.bat .keep
+recursive-include django_nose *.py
+recursive-include testapp *.py
+recursive-include testapp/fixtures *.json
+recursive-include unittests *.py
+
+recursive-exclude * *.py[co]
+recursive-exclude * __pycache__
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..98e39c5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,78 @@
+.PHONY: clean clean-build clean-pyc clean-test docs qa lint coverage jslint qa-all install-jslint test test-all coverage-console release sdist
+
+help:
+	@echo "clean - remove all artifacts"
+	@echo "clean-build - remove build artifacts"
+	@echo "clean-pyc - remove Python file artifacts"
+	@echo "clean-test - remove test and coverage artifacts"
+	@echo "coverage - check code coverage quickly with the default Python"
+	@echo "docs - generate Sphinx HTML documentation"
+	@echo "lint - check style with flake8"
+	@echo "qa - run linters and test coverage"
+	@echo "qa-all - run QA plus tox and packaging"
+	@echo "release - package and upload a release"
+	@echo "sdist - package"
+	@echo "test - run tests quickly with the default Python"
+	@echo "test-all - run tests on every Python version with tox"
+	@echo "test-release - upload a release to the PyPI test server"
+
+clean: clean-build clean-pyc clean-test
+
+qa: lint coverage
+
+qa-all: qa sdist test-all
+
+clean-build:
+	rm -fr build/
+	rm -fr dist/
+	rm -fr *.egg-info
+
+clean-pyc:
+	find . -name '*.pyc' -exec rm -f {} +
+	find . -name '*.pyo' -exec rm -f {} +
+	find . -name '*~' -exec rm -f {} +
+	find . -name '__pycache__' -exec rm -fr {} +
+
+clean-test:
+	rm -fr .tox/
+	rm -f .coverage
+	rm -fr htmlcov/
+
+docs:
+	$(MAKE) -C docs clean
+	$(MAKE) -C docs html
+	open docs/_build/html/index.html
+
+lint:
+	flake8 .
+
+test:
+	./manage.py test
+
+test-all:
+	tox --skip-missing-interpreters
+
+coverage-console:
+	coverage erase
+	COVERAGE=1 ./runtests.sh
+	coverage combine
+	coverage report -m
+
+coverage: coverage-console
+	coverage html
+	open htmlcov/index.html
+
+release: clean
+	python setup.py sdist bdist_wheel upload
+	python -m webbrowser -n https://testpypi.python.org/pypi/django-nose
+
+test-release:
+	python setup.py register -r https://testpypi.python.org/pypi
+	python setup.py sdist bdist_wheel upload -r https://testpypi.python.org/pypi
+	python -m webbrowser -n https://testpypi.python.org/pypi/django-nose
+
+sdist: clean
+	python setup.py sdist
+	ls -l dist
+	check-manifest
+	pyroma dist/`ls -t dist | head -n1`
diff --git a/README.rst b/README.rst
index eb64657..3b737d2 100644
--- a/README.rst
+++ b/README.rst
@@ -2,13 +2,25 @@
 django-nose
 ===========
 
-.. image:: https://travis-ci.org/django-nose/django-nose.png
-  :target: https://travis-ci.org/django-nose/django-nose
+.. image:: https://img.shields.io/pypi/v/django-nose.svg
+    :alt: The PyPI package
+    :target: https://pypi.python.org/pypi/django-nose
 
-Features
---------
+.. image:: https://img.shields.io/pypi/dw/django-nose.svg
+    :alt: PyPI download statistics
+    :target: https://pypi.python.org/pypi/django-nose
 
-* All the goodness of `nose`_ in your Django tests, like...
+.. image:: https://img.shields.io/travis/django-nose/django-nose/master.svg
+    :alt: TravisCI Build Status
+    :target: https://travis-ci.org/django-nose/django-nose
+
+.. image:: https://img.shields.io/coveralls/django-nose/django-nose/master.svg
+    :alt: Coveralls Test Coverage
+    :target: https://coveralls.io/r/django-nose/django-nose?branch=master
+
+.. Omit badges from docs
+
+**django-nose** provides all the goodness of `nose`_ in your Django tests, like:
 
   * Testing just your apps by default, not all the standard ones that happen to
     be in ``INSTALLED_APPS``
@@ -18,357 +30,32 @@ Features
     This not only saves busy-work but also eliminates the possibility of
     accidentally shadowing test classes.
   * Taking advantage of all the useful `nose plugins`_
-* Fixture bundling, an optional feature which speeds up your fixture-based
-  tests by a factor of 4
-* Reuse of previously created test DBs, cutting 10 seconds off startup time
-* Hygienic TransactionTestCases, which can save you a DB flush per test
-* Support for various databases. Tested with MySQL, PostgreSQL, and SQLite.
-  Others should work as well.
 
-.. _nose: http://somethingaboutorange.com/mrl/projects/nose/
+.. _nose: https://nose.readthedocs.org/en/latest/
 .. _nose plugins: http://nose-plugins.jottit.com/
 
+It also provides:
 
-Installation
-------------
-
-You can get django-nose from PyPI with... ::
-
-    pip install django-nose
-
-The development version can be installed with... ::
-
-    pip install -e git://github.com/django-nose/django-nose.git#egg=django-nose
-
-Since django-nose extends Django's built-in test command, you should add it to
-your ``INSTALLED_APPS`` in ``settings.py``::
-
-    INSTALLED_APPS = (
-        ...
-        'django_nose',
-        ...
-    )
-
-Then set ``TEST_RUNNER`` in ``settings.py``::
-
-    TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
-
-
-Use
----
-
-The day-to-day use of django-nose is mostly transparent; just run ``./manage.py
-test`` as usual.
-
-See ``./manage.py help test`` for all the options nose provides, and look to
-the `nose docs`_ for more help with nose.
-
-.. _nose docs: http://somethingaboutorange.com/mrl/projects/nose/
-
-
-Enabling Database Reuse
------------------------
-
-You can save several seconds at the beginning and end of your test suite by
-reusing the test database from the last run. To do this, set the environment
-variable ``REUSE_DB`` to 1::
-
-    REUSE_DB=1 ./manage.py test
-
-The one new wrinkle is that, whenever your DB schema changes, you should leave
-the flag off the next time you run tests. This will cue the test runner to
-reinitialize the test database.
-
-Also, REUSE_DB is not compatible with TransactionTestCases that leave junk in
-the DB, so be sure to make your TransactionTestCases hygienic (see below) if
-you want to use it.
-
-
-Enabling Fast Fixtures
-----------------------
-
-django-nose includes a fixture bundler which drastically speeds up your tests
-by eliminating redundant setup of Django test fixtures. To use it...
-
-1. Subclass ``django_nose.FastFixtureTestCase`` instead of
-   ``django.test.TestCase``. (I like to import it ``as TestCase`` in my
-   project's ``tests/__init__.py`` and then import it from there into my actual
-   tests. Then it's easy to sub the base class in and out.) This alone will
-   cause fixtures to load once per class rather than once per test.
-2. Activate fixture bundling by passing the ``--with-fixture-bundling`` option
-   to ``./manage.py test``. This loads each unique set of fixtures only once,
-   even across class, module, and app boundaries.
-
-How Fixture Bundling Works
-~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The fixture bundler reorders your test classes so that ones with identical sets
-of fixtures run adjacently. It then advises the first of each series to load
-the fixtures once for all of them (and the remaining ones not to bother). It
-also advises the last to tear them down. Depending on the size and repetition
-of your fixtures, you can expect a 25% to 50% speed increase.
-
-Incidentally, the author prefers to avoid Django fixtures, as they encourage
-irrelevant coupling between tests and make tests harder to comprehend and
-modify. For future tests, it is better to use the "model maker" pattern,
-creating DB objects programmatically. This way, tests avoid setup they don't
-need, and there is a clearer tie between a test and the exact state it
-requires. The fixture bundler is intended to make existing tests, which have
-already committed to fixtures, more tolerable.
-
-Troubleshooting
-~~~~~~~~~~~~~~~
-
-If using ``--with-fixture-bundling`` causes test failures, it likely indicates
-an order dependency between some of your tests. Here are the most frequent
-sources of state leakage we have encountered:
-
-* Locale activation, which is maintained in a threadlocal variable. Be sure to
-  reset your locale selection between tests.
-* memcached contents. Be sure to flush between tests. Many test superclasses do
-  this automatically.
-
-It's also possible that you have ``post_save`` signal handlers which create
-additional database rows while loading the fixtures. ``FastFixtureTestCase``
-isn't yet smart enough to notice this and clean up after it, so you'll have to
-go back to plain old ``TestCase`` for now.
-
-Exempting A Class From Bundling
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-In some unusual cases, it is desirable to exempt a test class from fixture
-bundling, forcing it to set up and tear down its fixtures at the class
-boundaries. For example, we might have a ``TestCase`` subclass which sets up
-some state outside the DB in ``setUpClass`` and tears it down in
-``tearDownClass``, and it might not be possible to adapt those routines to heed
-the advice of the fixture bundler. In such a case, simply set the
-``exempt_from_fixture_bundling`` attribute of the test class to ``True``.
-
-
-Speedy Hygienic TransactionTestCases
-------------------------------------
-
-Unlike the stock Django test runner, django-nose lets you write custom
-TransactionTestCase subclasses which expect to start with an unmarred DB,
-saving an entire DB flush per test.
-
-Background
-~~~~~~~~~~
-
-The default Django TransactionTestCase class `can leave the DB in an unclean
-state`_ when it's done. To compensate, TransactionTestCase does a
-time-consuming flush of the DB *before* each test to ensure it begins with a
-clean slate. Django's stock test runner then runs TransactionTestCases last so
-they don't wreck the environment for better-behaved tests. django-nose
-replicates this behavior.
-
-Escaping the Grime
-~~~~~~~~~~~~~~~~~~
-
-Some people, however, have made subclasses of TransactionTestCase that clean up
-after themselves (and can do so efficiently, since they know what they've
-changed). Like TestCase, these may assume they start with a clean DB. However,
-any TransactionTestCases that run before them and leave a mess could cause them
-to fail spuriously.
-
-django-nose offers to fix this. If you include a special attribute on your
-well-behaved TransactionTestCase... ::
-
-    class MyNiceTestCase(TransactionTestCase):
-        cleans_up_after_itself = True
-
-...django-nose will run it before any of those nasty, trash-spewing test cases.
-You can thus enjoy a big speed boost any time you make a TransactionTestCase
-clean up after itself: skipping a whole DB flush before every test. With a
-large schema, this can save minutes of IO.
-
-django-nose's own FastFixtureTestCase uses this feature, even though it
-ultimately acts more like a TestCase than a TransactionTestCase.
-
-.. _can leave the DB in an unclean state: https://docs.djangoproject.com/en/1.4/topics/testing/#django.test.TransactionTestCase
-
-
-Test-Only Models
-----------------
-
-If you have a model that is used only by tests (for example, to test an
-abstract model base class), you can put it in any file that's imported in the
-course of loading tests. For example, if the tests that need it are in
-``test_models.py``, you can put the model in there, too. django-nose will make
-sure its DB table gets created.
-
-
-Assertions
-----------
-
-``django-nose.tools`` provides pep8 versions of Django's TestCase asserts
-and some of its own as functions. ::
-
-   assert_redirects(response, expected_url, status_code=302, target_status_code=200, host=None, msg_prefix='')
-
-   assert_contains(response, text, count=None, status_code=200, msg_prefix='')
-   assert_not_contains(response, text, count=None, status_code=200, msg_prefix='')
-
-   assert_form_error(response, form, field, errors, msg_prefix='')
-
-   assert_template_used(response, template_name, msg_prefix='')
-   assert_template_not_used(response, template_name, msg_prefix='')
-
-   assert_queryset_equal(qs, values, transform=repr)
-
-   assert_num_queries(num, func=None, *args, **kwargs)
-
-   assert_code(response, status_code, msg_prefix='')
-
-   assert_ok(response, msg_prefix='')
-
-   assert_mail_count(count, msg=None)
-
-
-Using With South
-----------------
-
-`South`_ installs its own test command that turns off migrations during
-testing. Make sure that django-nose comes *after* ``south`` in
-``INSTALLED_APPS`` so that django_nose's test command is used.
-
-.. _South: http://south.aeracode.org/
-
-
-Always Passing The Same Options
--------------------------------
-
-To always set the same command line options you can use a `nose.cfg or
-setup.cfg`_ (as usual) or you can specify them in settings.py like this::
-
-    NOSE_ARGS = ['--failed', '--stop']
-
-.. _nose.cfg or setup.cfg: http://somethingaboutorange.com/mrl/projects/nose/0.11.2/usage.html#configuration
-
-
-Custom Plugins
---------------
-
-If you need to `make custom plugins`_, you can define each plugin class
-somewhere within your app and load them from settings.py like this::
-
-    NOSE_PLUGINS = [
-        'yourapp.tests.plugins.SystematicDysfunctioner',
-        # ...
-    ]
-
-Just like middleware or anything else, each string must be a dot-separated,
-importable path to an actual class. Each plugin class will be instantiated and
-added to the Nose test runner.
-
-.. _make custom plugins: http://somethingaboutorange.com/mrl/projects/nose/0.11.2/plugins.html#writing-plugins
-
-
-Older Versions of Django
-------------------------
-Upgrading from Django <= 1.3 to Django 1.4
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-In versions of Django < 1.4 the project folder was in fact a python package as
-well (note the __init__.py in your project root). In Django 1.4, there is no
-such file and thus the project is not a python module.
-
-**When you upgrade your Django project to the Django 1.4 layout, you need to
-remove the __init__.py file in the root of your project (and move any python
-files that reside there other than the manage.py) otherwise you will get a
-`ImportError: No module named urls` exception.**
-
-This happens because Nose will intelligently try to populate your sys.path, and
-in this particular case includes your parent directory if your project has a
-__init__.py file (see: https://github.com/nose-devs/nose/blob/release_1.1.2/nose/importer.py#L134).
-
-This means that even though you have set up your directory structure properly and
-set your `ROOT_URLCONF='my_project.urls'` to match the new structure, when running
-django-nose's test runner it will try to find your urls.py file in `'my_project.my_project.urls'`.
-
-
-Upgrading from Django < 1.2
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Django 1.2 switches to a `class-based test runner`_. To use django-nose
-with Django 1.2, change your ``TEST_RUNNER`` from ``django_nose.run_tests`` to
-``django_nose.NoseTestSuiteRunner``.
-
-``django_nose.run_tests`` will continue to work in Django 1.2 but will raise a
-warning. In Django 1.3, it will stop working.
-
-If you were using ``django_nose.run_gis_tests``, you should also switch to
-``django_nose.NoseTestSuiteRunner`` and use one of the `spatial backends`_ in
-your ``DATABASES`` settings.
-
-.. _class-based test runner: http://docs.djangoproject.com/en/dev/releases/1.2/#function-based-test-runners
-.. _spatial backends: http://docs.djangoproject.com/en/dev/ref/contrib/gis/db-api/#id1
-
-Django 1.1
-~~~~~~~~~~
-
-If you want to use django-nose with Django 1.1, use
-https://github.com/django-nose/django-nose/tree/django-1.1 or
-http://pypi.python.org/pypi/django-nose/0.0.3.
-
-Django 1.0
-~~~~~~~~~~
-
-django-nose does not support Django 1.0.
-
-
-Recent Version History
-----------------------
-1.4.1 (2015-06-29)
- * Fix version number (ezarowny)
- * Fix choice options, unbreaking nose-cover (aamirtharaj-rpx, jwhitlock)
- * Support 1.8 app loading system (dgladkov)
- * Support non-ASCII file names (singingwolfboy)
- * Better PEP8'd assertion names (roganov)
-
-1.4 (2015-04-23)
-  * Django 1.8 support (timc3, adepue, jwhitlock)
-  * Support --testrunner option (st3lk)
-  * Fix REUSE_DB second run in py3k (edrmp)
-
-1.3 (2014-12-05)
-  * Django 1.6 and 1.7 support (conrado, co3k, Nepherhotep, mbertheau)
-  * Python 3.3 and 3.4 testing and support (frewsxcv, jsocol)
-
-1.2 (2013-07-23)
-  * Python 3 support (melinath and jonashaag)
-  * Django 1.5 compat (fabiosantoscode)
+  * Fixture bundling, an optional feature which speeds up your fixture-based
+    tests by a factor of 4
+  * Reuse of previously created test DBs, cutting 10 seconds off startup time
+  * Hygienic TransactionTestCases, which can save you a DB flush per test
+  * Support for various databases. Tested with MySQL, PostgreSQL, and SQLite.
+    Others should work as well.
 
-1.1 (2012-05-19)
-  * Django TransactionTestCases don't clean up after themselves; they leave
-    junk in the DB and clean it up only on ``_pre_setup``. Thus, Django makes
-    sure these tests run last. Now django-nose does, too. This means one fewer
-    source of failures on existing projects. (Erik Rose)
-  * Add support for hygienic TransactionTestCases. (Erik Rose)
-  * Support models that are used only for tests. Just put them in any file
-    imported in the course of loading tests. No more crazy hacks necessary.
-    (Erik Rose)
-  * Make the fixture bundler more conservative, fixing some conceivable
-    situations in which fixtures would not appear as intended if a
-    TransactionTestCase found its way into the middle of a bundle. (Erik Rose)
-  * Fix an error that would surface when using SQLAlchemy with connection
-    pooling. (Roger Hu)
-  * Gracefully ignore the new ``--liveserver`` option introduced in Django 1.4;
-    don't let it through to nose. (Adam DePue)
+django-nose requires nose 1.2.1 or later, and the `latest release`_ is
+recommended.  It follows the `Django's support policy`_, supporting:
 
-1.0 (2012-03-12)
-  * New fixture-bundling plugin for avoiding needless fixture setup (Erik Rose)
-  * Moved FastFixtureTestCase in from test-utils, so now all the
-    fixture-bundling stuff is in one library. (Erik Rose)
-  * Added the REUSE_DB setting for faster startup and shutdown. (Erik Rose)
-  * Fixed a crash when printing options with certain verbosities. (Daniel Abel)
-  * Broke hard dependency on MySQL. Support PostgreSQL. (Roger Hu)
-  * Support SQLite, both memory- and disk-based. (Roger Hu and Erik Rose)
-  * Nail down versions of the package requirements. (Daniel Mizyrycki)
+  * Django 1.4 (LTS) with Python 2.6 and 2.7
+  * Django 1.7 with Python 2.7 or 3.4
+  * Django 1.8 (LTS) with Python 2.7 or 3.4
+  * Django 1.9 (pre-release)
 
-0.1.3 (2010-04-15)
-  * Even better coverage support (rozza)
-  * README fixes (carljm and ionelmc)
-  * optparse OptionGroups are handled better (outofculture)
-  * nose plugins are loaded before listing options
+.. _latest release: https://pypi.python.org/pypi/nose
+.. _Django's support policy: https://docs.djangoproject.com/en/1.8/internals/release-process/#supported-versions
 
-See more in changelog.txt.
+Development
+-----------
+:Code:   https://github.com/django-nose/django-nose
+:Issues: https://github.com/django-nose/django-nose/issues?state=open
+:Docs:   https://django-nose.readthedocs.org
diff --git a/changelog.rst b/changelog.rst
new file mode 100644
index 0000000..b9fea48
--- /dev/null
+++ b/changelog.rst
@@ -0,0 +1,102 @@
+Changelog
+---------
+
+1.4.2 (2015-10-07)
+~~~~~~~~~~~~~~~~~~
+* Warn against using REUSE_DB=1 and FastFixtureTestCase in docs
+* REUSE_DB=1 uses new transaction management in Django 1.7, 1.8 (scottsexton)
+* Try to avoid accidentally using production database with REUSE_DB=1 (alexjg, eroninjapan)
+* Supported Django versions limited to current supported Django version 1.4,
+  1.7, and 1.8, as well as relevant Python versions.
+
+1.4.1 (2015-06-29)
+~~~~~~~~~~~~~~~~~~
+* Fix version number (ezarowny)
+* Fix choice options, unbreaking nose-cover (aamirtharaj-rpx, jwhitlock)
+* Support 1.8 app loading system (dgladkov)
+* Support non-ASCII file names (singingwolfboy)
+* Better PEP8'd assertion names (roganov)
+
+1.4 (2015-04-23)
+~~~~~~~~~~~~~~~~
+* Django 1.8 support (timc3, adepue, jwhitlock)
+* Support --testrunner option (st4lk)
+* Fix REUSE_DB second run in py3k (edrmp)
+
+1.3 (2014-12-05)
+~~~~~~~~~~~~~~~~
+* Django 1.6 and 1.7 support (conrado, co3k, Nepherhotep, mbertheau)
+* Python 3.3 and 3.4 testing and support (frewsxcv, jsocol)
+
+1.2 (2013-07-23)
+~~~~~~~~~~~~~~~~
+* Python 3 support (melinath and jonashaag)
+* Django 1.5 compat (fabiosantoscode)
+
+1.1 (2012-05-19)
+~~~~~~~~~~~~~~~~
+* Django TransactionTestCases don't clean up after themselves; they leave
+  junk in the DB and clean it up only on ``_pre_setup``. Thus, Django makes
+  sure these tests run last. Now django-nose does, too. This means one fewer
+  source of failures on existing projects. (Erik Rose)
+* Add support for hygienic TransactionTestCases. (Erik Rose)
+* Support models that are used only for tests. Just put them in any file
+  imported in the course of loading tests. No more crazy hacks necessary.
+  (Erik Rose)
+* Make the fixture bundler more conservative, fixing some conceivable
+  situations in which fixtures would not appear as intended if a
+  TransactionTestCase found its way into the middle of a bundle. (Erik Rose)
+* Fix an error that would surface when using SQLAlchemy with connection
+  pooling. (Roger Hu)
+* Gracefully ignore the new ``--liveserver`` option introduced in Django 1.4;
+  don't let it through to nose. (Adam DePue)
+
+1.0 (2012-03-12)
+~~~~~~~~~~~~~~~~
+* New fixture-bundling plugin for avoiding needless fixture setup (Erik Rose)
+* Moved FastFixtureTestCase in from test-utils, so now all the
+  fixture-bundling stuff is in one library. (Erik Rose)
+* Added the REUSE_DB setting for faster startup and shutdown. (Erik Rose)
+* Fixed a crash when printing options with certain verbosities. (Daniel Abel)
+* Broke hard dependency on MySQL. Support PostgreSQL. (Roger Hu)
... 2986 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-nose.git



More information about the Python-modules-commits mailing list