Russell Keith-Magee
5211f48ae3
Fixed #12164 -- Removed the Python 2.3 compatibility imports and workarounds. Thanks to timo and claudep for the patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-04 14:00:30 +00:00
Russell Keith-Magee
2fc19d8d6f
Fixed #12932 -- Added an extra argument to suite_result() in the test runner, and added **kwargs as protection against future changes. Thanks to Eric Holscher for the report and patch.
...
This is BACKWARDS INCOMPATIBLE for anyone that has written a custom DjangoTestRunner class since it was introduced in r12255.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12487 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-22 12:34:52 +00:00
Russell Keith-Magee
f9a33cbfde
Removed a stray debug statement. Thanks to Ramiro Morales for the report.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12375 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-02 13:01:27 +00:00
Russell Keith-Magee
84599495a0
Fixed #6364 -- Added the ability to run individual doctests.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12364 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-01 13:00:00 +00:00
Russell Keith-Magee
14116bc53e
Fixed #12672 -- Added the ability to configure which applications are available on which database.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12290 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-25 12:23:30 +00:00
Russell Keith-Magee
6755a039eb
Fixed #12542 -- Added the TEST_MIRROR setting, allowing testing of read slave databases.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12289 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-25 12:05:38 +00:00
Russell Keith-Magee
e2d094b8fb
Fixed #12640 -- Corrected a regression in test suite construction order introduced by #12255 . Also updated the docs to reflect what the test code has always done. Thanks to Ramiro Morales for the report and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12261 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-19 01:14:02 +00:00
Russell Keith-Magee
53b61d9c02
Fixed #12624 -- Modified test runners to be class based.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12255 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-18 15:11:01 +00:00
Karen Tracey
dae4972b4d
Ensure the default keyboard interrupt handler is restored
...
even if the test runner raises an exception. Thanks Alex
Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12036 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-31 19:52:26 +00:00
Karen Tracey
9a55432213
Fixed #12364 : Added graceful exit from a test run when Ctrl-C is pressed. Thanks Randy Barlow.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12034 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-31 18:48:28 +00:00
Russell Keith-Magee
ff60c5f9de
Fixed #1142 -- Added multiple database support.
...
This monster of a patch is the result of Alex Gaynor's 2009 Google Summer of Code project.
Congratulations to Alex for a job well done.
Big thanks also go to:
* Justin Bronn for keeping GIS in line with the changes,
* Karen Tracey and Jani Tiainen for their help testing Oracle support
* Brett Hoerner, Jon Loyens, and Craig Kimmerer for their feedback.
* Malcolm Treddinick for his guidance during the GSoC submission process.
* Simon Willison for driving the original design process
* Cal Henderson for complaining about ponies he wanted.
... and everyone else too numerous to mention that helped to bring this feature into fruition.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-22 15:18:51 +00:00
Karen Tracey
92eec3ef9a
Fixed #11613 : Added a failfast option for test running. Thanks jukvalim and Randy Barlow.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@11843 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-13 16:24:36 +00:00
Russell Keith-Magee
5f7c6a8d29
Fixed #9031 -- Clarified the error message when the label used to run a specific test case method doesn't name a valid test case class. Thanks to Thomas Guettler for the suggestion and patch.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9879 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-02-22 08:34:51 +00:00
Karen Tracey
3c87c22b3c
Added code to make TestSuites iterable when running on Python 2.3. (r9756 added code that iterates over them, thus broke running tests on Python 2.3, sigh.)
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9769 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-17 22:04:40 +00:00
Karen Tracey
344f16e220
Fixed #8138 -- Changed django.test.TestCase to rollback tests (when the database supports it) instead of flushing and reloading the database. This can substantially reduce the time it takes to run large test suites.
...
This change may be slightly backwards incompatible, if existing tests need to test transactional behavior, or if they rely on invalid assumptions or a specific test case ordering. For the first case, django.test.TransactionTestCase should be used. TransactionTestCase is also a quick fix to get around test case errors revealed by the new rollback approach, but a better long-term fix is to correct the test case. See the testing doc for full details.
Many thanks to:
* Marc Remolt for the initial proposal and implementation.
* Luke Plant for initial testing and improving the implementation.
* Ramiro Morales for feedback and help with tracking down a mysterious PostgreSQL issue.
* Eric Holscher for feedback regarding the effect of the change on the Ellington testsuite.
* Russell Keith-Magee for guidance and feedback from beginning to end.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9756 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-01-16 02:30:22 +00:00
Russell Keith-Magee
9dc4ba875f
Fixed #5461 -- Refactored the database backend code to use classes for the creation and introspection modules. Introduces a new validation module for DB-specific validation. This is a backwards incompatible change; see the wiki for details.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11 12:11:25 +00:00
Malcolm Tredinnick
f1a24be01c
Fixed #6481 -- Fixed a bunch of import problems (and some whitespace cleanups).
...
Found by Bastian Kleineidam with help from pyflakes. Thanks.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7131 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-19 00:08:08 +00:00
Russell Keith-Magee
650cea9170
Fixed #4460 -- Added the ability to be more specific in the test cases that are executed. This is a backwards incompatible change for any user with a custom test runner. See the wiki for details.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5769 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-28 04:02:52 +00:00
Russell Keith-Magee
1b7fe09660
Fixed #3771 -- Modified the test runner to observe the --noinput argument controlling script interactivity. This means that test scripts can now be put in a buildbot environment. This is a backwards incompatible change for anyone that has written a custom test runner. Thanks for the suggestion, moof@metamoof.net.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-23 12:14:32 +00:00
Russell Keith-Magee
9922a04bb6
Fixed #3782 -- Added support for the suite() method recommended by the Python unittest docs. Thanks for the suggestion, rene.puls@repro-mayr.de.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5729 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-07-20 13:57:49 +00:00
Russell Keith-Magee
0e7a49fa1e
Fixed #4426 -- Renamed duplicate doctest module _doctest, and documented the fact that it isn't an _exact_ copy of the doctest from Python 2.4.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-31 13:18:12 +00:00
Russell Keith-Magee
c7db4beb62
Fixed import error handling when application tests are stored in a tests directory, rather than a tests.py file.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5180 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-05-10 12:07:34 +00:00
Russell Keith-Magee
c1a73d80da
Fixed #3253 -- Included test errors in the return code.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-03-29 11:59:31 +00:00
Russell Keith-Magee
f313e07b6e
Fixed #3253 -- Exposed the number of failed tests as a return code in manage.py and runtests.py.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4608 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-26 12:52:01 +00:00
Russell Keith-Magee
fb509ee8d3
Fixed #2916 -- Moved syncdb call out of simple test runner and into create_test_db, to match documentation and simplify testing process for people using other test frameworks. Thanks, remco@diji.biz.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4541 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-18 08:07:18 +00:00
Malcolm Tredinnick
6c4757729b
Revert [4485] in order to fix accidental mod_python breakage. Refs #2920 .
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4486 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-11 23:50:35 +00:00
Russell Keith-Magee
0e924c70b1
Refs #2920 -- Replaced implicit uses of _() with explicit imports or calls to gettext(). At some point post 0.96, we need to remove the calls that put _ into the builtins.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4485 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-02-11 06:20:52 +00:00
Adrian Holovaty
41d11a685f
Fixed #2968 -- Changed arguments to __import__ to use empty dictionary instead of empty string, for stricter compliance with Python library reference. Thanks for the patch, Yasushi Masuda
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3951 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-10-30 20:50:27 +00:00
Russell Keith-Magee
36added124
Fixes #2669 -- Added check on import of tests.py to differentiate between an absent tests.py, and an existent tests.py with an import error in it.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3740 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-09 14:58:46 +00:00
Russell Keith-Magee
d043200077
Refs #2333 - Re-added the template rendering signal for testing purposes; however, the signal is not available during normal operation. It is only added as part of an instrumentation step that occurs during test framework setup. Previous attempt (r3659) was reverted (r3666) due to performance concerns.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3707 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-09-02 09:26:24 +00:00
Russell Keith-Magee
fc2d5f461f
Refs #2333 - Added more documentation for testing framework, and clarified some code as a result of trying to describe it.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3689 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-31 14:29:47 +00:00
Russell Keith-Magee
7dce86ce02
Refs #2333 - Added test framework. This includes doctest and unittest finders, Django-specific doctest and unittest wrappers, and a pseudo-client that can be used to stimulate and test views.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3658 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2006-08-27 12:24:59 +00:00