1
0
mirror of https://github.com/django/django.git synced 2024-11-18 07:26:04 +00:00
Commit Graph

62 Commits

Author SHA1 Message Date
Andrei Kulakov
e2bfcab065 Fixed #24394 -- Allowed running tests with empty default dictionary. 2015-03-25 17:56:59 -04:00
Tim Graham
307c0f299a Refs #24324 -- Fixed Python 2 test failures when path to Django source contains non-ASCII characters. 2015-02-17 19:03:03 -05:00
Tim Graham
ad0be620ae Moved contrib.gis tests out of contrib. 2015-02-11 10:29:54 -05:00
Aymeric Augustin
1b8af4cfa0 Disallowed importing concrete models without an application.
Removed fragile algorithm to find which application a model belongs to.

Fixed #21680, #21719. Refs #21794.
2015-02-10 21:41:19 +01:00
Tim Graham
0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
Tim Graham
0386b97706 Fixed test_runner test failure on Python 3.5; refs #23763.
Python change is http://bugs.python.org/issue22032
2015-01-23 16:23:32 -05:00
Marc Tamlyn
b5c1a85b50 Fixed #24118 -- Added --debug-sql option for tests.
Added a --debug-sql option for tests and runtests.py which outputs the
SQL logger for failing tests. When combined with --verbosity=2, it also
outputs the SQL for passing tests.

Thanks to Berker, Tim, Markus, Shai, Josh and Anssi for review and
discussion.
2015-01-12 08:16:08 +00:00
Tim Graham
82e4f956e3 Fixed #23289 -- Added mock as a test dependency. 2014-12-01 16:08:25 -05:00
wrwrwr
e22c64dfc0 Fixed #23742 -- Added an option to reverse tests order.
This is useful for debugging side effects affecting tests that
are usually executed before a given test. Full suite and pair
tests sort cases more or less deterministically, thus some test
cross-dependencies are easier to reveal by reversing the order.

Thanks Preston Timmons for the review.
2014-11-24 19:24:11 -05:00
wrwrwr
31f85bae1e Changed test_runner imports to name objects imported from test.runner. 2014-11-24 17:31:39 -05:00
Berker Peksag
f7969b0920 Fixed #23620 -- Used more specific assertions in the Django test suite. 2014-11-03 11:56:37 -05:00
Claude Paroz
45db842c9b Fixed #23652 -- Restored database name after destroying test database
Thanks Bjarkias for the report.
2014-10-24 17:04:43 +02:00
Claude Paroz
2c9a03d487 Fixed #23707 -- Prevented discovery of duplicated tests 2014-10-23 21:03:57 +02:00
Claude Paroz
bbc3505ef8 Removed unneeded override_system_checks
Refs #23685.
2014-10-21 20:54:32 +02:00
Tim Graham
a4f23eba2e Fixed #23421 -- Corrected TEST SERIALIZE setting.
Thanks gkoller for the report.
2014-09-24 14:46:10 -04:00
Claude Paroz
4b4524291a Converted test management command to argparse
Keeping backwards compatibility with test_runner.option_list is
tricky and would imply transforming an optparse.Option to an
argparse.Action. I choose to introduce a backwards incompatible
change because it only affects testing, not runtime behavior.
2014-06-14 13:43:39 +02:00
Andrew Godwin
7018bcfb71 Fix broken alias testing test 2014-06-08 20:07:35 -07:00
Greg Chapple
72f055e535 Fixed #20550 -- Added keepdb argument to destroy_test_db 2014-06-05 23:17:27 +01:00
Greg Chapple
b7aa7c4ab4 Fixed #20550 -- Added ability to preserve test db between runs 2014-05-28 16:22:46 +01:00
Nikolaus Schlemm
d11e836203 cater for running tests from another directory than tests - applying existing pattern to newly added test_testcase_ordering as well 2014-05-16 12:11:35 +02:00
Preston Timmons
251e833c75 Removed old test runner test cases.
These files were added as part of #12658, which pertained to the old django.test.simple test runner. No tests call them anymore.
2014-04-20 22:00:39 -05:00
Simon Charette
79f05616fb Fixed flake8 warnings introduced in recent commits. 2014-04-16 16:49:37 -04:00
Claude Paroz
3e3a7372f5 Fixed #22102 -- Made SimpleTestCase tests run before unittest.TestCase ones
Thanks aptiko for the reporti and Tim Graham for the review.
2014-04-12 11:42:06 +02:00
Tim Graham
bf5430a20b Removed django.test.simple and django.test._doctest per deprecation timeline.
refs #17365, #17366, #18727.
2014-03-21 13:36:46 -04:00
Claude Paroz
c564277937 Fixed #22237 -- Removed some warnings in the test suite
Thanks Aymeric Augustin for the report.
2014-03-09 22:10:49 +01:00
Claude Paroz
0c6a339952 Avoided changing raw DeprecationWarning filter behavior
Refs #21188. Now pure Python DeprecationWarning visibility should
be back to Python defaults.
2014-03-08 11:13:48 +01:00
Rodolfo Carvalho
0d91225892 Fixed many typos in comments and docstrings.
Thanks Piotr Kasprzyk for help with the patch.
2014-03-03 07:38:09 -05:00
Russell Keith-Magee
d818e0c9b2 Fixed #16905 -- Added extensible checks (nee validation) framework
This is the result of Christopher Medrela's 2013 Summer of Code project.

Thanks also to Preston Holmes, Tim Graham, Anssi Kääriäinen, Florian
Apolloner, and Alex Gaynor for review notes along the way.

Also: Fixes #8579, fixes #3055, fixes #19844.
2014-01-20 10:45:21 +08:00
Preston Timmons
2139e09d83 Removed unused function in test_runner tests
This was used for python 2.6 and unittest2 compatibility. It was
forgotten when the code that used it was removed.
2014-01-01 12:41:43 +01:00
Preston Timmons
18d962f2e6 Fixed #21206 -- Fixed test discovery without labels
Added test to verify an empty label performs discovery on the current
working directory.
2014-01-01 12:40:16 +01:00
Claude Paroz
587b678d41 Made DeprecationDisplayTest more robust 2013-12-31 13:12:53 +01:00
Preston Timmons
aef019de61 Fixed #21206 -- No longer run discovery if the test label doesn't point to a package or directory.
Thanks thepapermen for the report and Carl Meyer for the review.
2013-12-26 11:26:24 -05:00
Aymeric Augustin
690d1cb8d0 Made AppConfig importable from django.apps.
It is a public API.
2013-12-22 11:39:55 +01:00
Aymeric Augustin
2fef9e5375 Moved apps back in the toplevel django namespace.
Reverted 4a56a93cc4.
2013-12-22 11:39:55 +01:00
Aymeric Augustin
99bd39ef6e Added the ability to supply custom app configs. 2013-12-22 11:39:18 +01:00
Aymeric Augustin
2b56d69102 Implemented two-stage app-cache population.
First stage imports app modules. It doesn't catch import errors. This
matches the previous behavior and keeps the code simple.

Second stage import models modules. It catches import errors and retries
them after walking through the entire list once. This matches the
previous behavior and seems useful.

populate_models() is intended to be equivalent to populate(). It isn't
wired yet. That is coming in the next commit.
2013-12-22 11:39:17 +01:00
Aymeric Augustin
4a56a93cc4 Moved the new app cache inside core. 2013-12-17 10:17:46 +01:00
Aymeric Augustin
30bdad1c47 Refactored old test runner to handle apps without a models module. 2013-12-17 10:17:45 +01:00
Jason Myers
c3791463a5 Fixing E302 Errors
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-11-02 23:48:47 -05:00
Tim Graham
36ded01527 Fixed #21302 -- Fixed unused imports and import *. 2013-11-02 15:24:56 -04:00
Alex Gaynor
9d740eb8b1 Fix all violators of E231 2013-10-26 12:15:03 -07:00
Alasdair Nicol
a800036981 Fixed #21287 -- Fixed E123 pep8 warnings 2013-10-18 10:07:39 +01:00
Tim Graham
4ba373840a Fixed #16534 -- Improved ability to customize DiscoverRunner
Added DiscoverRunner.test_suite and .test_runner attributes.

Thanks tomchristie for the suggestion and jcd for the patch.
2013-09-10 09:49:39 -04:00
Eric Boersma
4d13cc56de Fixed #21035 -- Changed docs to treat the acronym SQL phonetically.
The documentation and comments now all use 'an' to
refer to the word SQL and not 'a'.
2013-09-05 20:14:58 -04:00
Claude Paroz
5c1143910e Removed most of absolute_import imports
Should be unneeded with Python 2.7 and up.
Added some unicode_literals along the way.
2013-07-29 20:28:13 +02:00
Claude Paroz
fdd7a355bf Deprecated django.utils.importlib
This was a shim for pre-Python 2.7 support.
2013-07-29 17:10:22 +02:00
Tim Graham
2456ffa42c Fixed #20746 -- Removed Python 2.6 specific code/docs 2013-07-14 13:02:55 -04:00
Tim Graham
d9c580306c Fixed #20681 -- Prevented teardown_databases from attempting to tear down aliases
Thanks simonpercivall.
2013-07-13 17:46:05 -04:00
Tim Graham
2cbd579efe Fixed #19940 -- Made test.runner.setup_databases properly handle aliases for default db.
Thanks simonpercivall.
2013-07-04 19:58:58 -04:00
Aymeric Augustin
909433fa50 Removed tests for django.utils.unittest vs. unittest.
Silenced warnings caused by the deprecation of django.utils.unittest.

Thanks Preston Timmons and Carl Meyer for their advice.

Fixed #20680.
2013-07-01 21:49:11 +02:00