summaryrefslogtreecommitdiff
path: root/django/test/simple.py
AgeCommit message (Collapse)Author
2014-03-21Removed django.test.simple and django.test._doctest per deprecation timeline.Tim Graham
refs #17365, #17366, #18727.
2014-03-08Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warningsClaude Paroz
Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
2013-12-26Made the AppConfig API marginally more consistent.Aymeric Augustin
Eliminated the app_ prefix that was more confusing than useful.
2013-12-24Renamed AppCache to Apps.Aymeric Augustin
Also renamed app_cache to apps and "app cache" to "app registry". Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
2013-12-22Moved apps back in the toplevel django namespace.Aymeric Augustin
Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
2013-12-17Moved the new app cache inside core.Aymeric Augustin
2013-12-17Refactored old test runner to handle apps without a models module.Aymeric Augustin
2013-12-17Deprecated get_app().Aymeric Augustin
2013-12-17Deprecated get_apps().Aymeric Augustin
2013-12-17Removed module-level functions for the app cache.Aymeric Augustin
Since the original ones in django.db.models.loading were kept only for backwards compatibility, there's no need to recreate them. However, many internals of Django still relied on them. They were also imported in django.db.models. They never appear in the documentation, except a quick mention of get_models and get_app in the 1.2 release notes to document an edge case in GIS. I don't think that makes them a public API. This commit doesn't change the overall amount of global state but clarifies that it's tied to the app_cache object instead of hiding it behind half a dozen functions.
2013-12-10Fixed E124 pep8 warnings.Loic Bistuer
2013-11-02Fixed all E261 warningscoagulant
2013-07-29Deprecated django.utils.importlibClaude Paroz
This was a shim for pre-Python 2.7 support.
2013-07-01Removed tests for django.utils.unittest vs. unittest.Aymeric Augustin
Silenced warnings caused by the deprecation of django.utils.unittest. Thanks Preston Timmons and Carl Meyer for their advice. Fixed #20680.
2013-06-29Advanced deprecation warnings for Django 1.7.Aymeric Augustin
2013-05-27Fixed #20503 - Moved doctest utilities in with the rest of the deprecated ↵Carl Meyer
test code. The ``DocTestRunner`` and ``OutputChecker`` were formerly in ``django.test.testcases``, now they are in ``django.test.simple``. This avoids triggering the ``django.test._doctest`` deprecation message with any import from ``django.test``. Since these utility classes are undocumented internal API, they can be moved without a separate deprecation process. Also removed the deprecation warnings specific to these classes, as they are now covered by the module-level warning in ``django.test.simple``. Thanks Anssi for the report. Refs #17365.
2013-05-10Fixed #17365, #17366, #18727 -- Switched to discovery test runner.Carl Meyer
Thanks to Preston Timmons for the bulk of the work on the patch, especially updating Django's own test suite to comply with the requirements of the new runner. Thanks also to Jannis Leidel and Mahdi Yusuf for earlier work on the patch and the discovery runner. Refs #11077, #17032, and #18670.
2013-04-12Modified test_utils to work with unittest2 discovery.Preston Timmons
2013-03-24Fixed #18985 -- ensure module level deprecations are displayedPreston Holmes
Also don't compete with -W CLI option. Thanks to Aymeric Augustin for the catch, and Claude Paroz for the patch.
2013-01-31Fixed #19711 -- Typo in __all__ declaration in django/test/simple.pyRafal Stozek
2013-01-09Fixed #19546 - ensure that deprecation warnings are shown during testsPreston Holmes
refs #18985
2012-07-24Fixed #18271 -- Changed stage at which TransactionTestCase flushes DB tables.Ramiro Morales
Previously, the flush was done before the test case execution and now it is performed after it. Other changes to the testing infrastructure include: * TransactionTestCase now doesn't reset autoincrement sequences either (previous behavior can achieved by using `reset_sequences`.) With this, no implicit such reset is performed by any of the provided TestCase classes. * New ordering of test cases: All unittest tes cases are run first and doctests are run at the end. THse changes could be backward-incompatible with test cases that relied on some kind of state being preserved between tests. Please read the relevant sections of the release notes and testing documentation for further details. Thanks Andreas Pelme for the initial patch. Karen Tracey and Anssi Kääriäinen for the feedback and Anssi for reviewing. This also fixes #12408.
2012-06-09Reverted 905e33f, now that DatabaseFeatures does not need confirmClaude Paroz
Connection.features does not need to be confirmed any more, after commit aa42357, rendering obsolete the workaround when using TEST_MIRROR (Refs #16885, #17760).
2012-04-24Fixed #17954 -- Fixed dependency checking for test databases. Thanks Łukasz ↵Claude Paroz
Rekucki for the report and the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17931 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31Removed deprecated DjangoTestRunner.Aymeric Augustin
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17840 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-30Fixed #10868 -- Stopped restoring database connections after the tests' ↵Julien Phalip
execution in order to prevent the production database from being exposed to potential threads that would still be running. Also did a bit of PEP8-cleaning while I was in the area. Many thanks to ovidiu for the report and to Anssi Kääriäinen for thoroughly investigating this issue. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17411 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-20Fixed #16885 -- Confirmed features of mirror databases when setting up test ↵Aymeric Augustin
databases. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17382 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-14Fixed #16239 -- Removed stale entry in django.test.simple.__all__. Thanks, ↵Jannis Leidel
melinath. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16396 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-12Fixed #12658 -- Fixed test discovery so ImportErrors aren't ignored when ↵Ramiro Morales
both `tests` and `models` are packages. Thanks schinckel for the report and boxm for a patch for the issue. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16382 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02Advanced deprecations in django.test.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15986 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28Removed a bunch more Python 2.4 workarounds now that we don't support that ↵Adrian Holovaty
version. Refs #15702 -- thanks to jonash for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-18Fixed #15368 -- Ensure that raw unittest TestCase instances can be invoked ↵Russell Keith-Magee
individually by the test runner. Thanks to SmileyChris for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15876 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-02Fixed #15029 -- Moved to database backends the ability to decide if two ↵Ramiro Morales
DATABASES items are different when creating temporary databases for tests. hG: Enter commit message. Lines beginning with 'HG:' are removed. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15392 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-09Fixed a couple of typos and small errors from r14696 and r14822.Ramiro Morales
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14862 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-05Fixed #14799 -- Provided a full solution for test database creation order ↵Russell Keith-Magee
problems. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14822 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-30Ensured that the test suite creates the default DB before any others.Jacob Kaplan-Moss
Refs #14799. Technically this fixes the problem, but I'm far from convinced it's the perfect solution, so I'm leaving the ticket open. I'm committing this now because it's the minimum required to get the test suite running again, but this commit can -- and probably should -- be reverted in favor of a more holistic fix later on. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14756 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-25Fixed #14415 -- Corrected the process of creating and destroying test ↵Russell Keith-Magee
databases to prevent accidental deletion of the source database. Also improves the mirroring process to prevent some cross-connection effects. Thanks to Shai Berger for the help diagnosing and testing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14696 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft ↵Russell Keith-Magee
patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to ↵Russell Keith-Magee
DeprecationWarnings, and removed 1.1 deprecated code. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-26Fixed #13827 -- Cleaned up a few unnecessary function calls.Jannis Leidel
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13876 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-04Fixed #12164 -- Removed the Python 2.3 compatibility imports and ↵Russell Keith-Magee
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-02-22Fixed #12932 -- Added an extra argument to suite_result() in the test ↵Russell Keith-Magee
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-02Removed a stray debug statement. Thanks to Ramiro Morales for the report.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12375 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-01Fixed #6364 -- Added the ability to run individual doctests.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12364 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-25Fixed #12672 -- Added the ability to configure which applications are ↵Russell Keith-Magee
available on which database. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12290 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-25Fixed #12542 -- Added the TEST_MIRROR setting, allowing testing of read ↵Russell Keith-Magee
slave databases. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12289 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-01-19Fixed #12640 -- Corrected a regression in test suite construction order ↵Russell Keith-Magee
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-18Fixed #12624 -- Modified test runners to be class based.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12255 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-12-31Ensure the default keyboard interrupt handler is restoredKaren Tracey
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-31Fixed #12364: Added graceful exit from a test run when Ctrl-C is pressed. ↵Karen Tracey
Thanks Randy Barlow. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12034 bcc190cf-cafb-0310-a4f2-bffc1f526a37