diff options
| author | Preston Timmons <prestontimmons@gmail.com> | 2013-12-31 11:41:34 -0600 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2014-01-01 12:40:16 +0100 |
| commit | 18d962f2e6cc8829d60d6f6dfb3ee3855fa5362e (patch) | |
| tree | f7fc7d16fae609acbaa58564dadb9c0889862f7f /django | |
| parent | fbbe7ca30c9bd4c1f1d4611118da6c746be89566 (diff) | |
Fixed #21206 -- Fixed test discovery without labels
Added test to verify an empty label performs discovery on the current
working directory.
Diffstat (limited to 'django')
| -rw-r--r-- | django/test/runner.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/django/test/runner.py b/django/test/runner.py index d8994d5ec2..d3c53ffc44 100644 --- a/django/test/runner.py +++ b/django/test/runner.py @@ -154,10 +154,12 @@ class DiscoverRunner(object): def is_discoverable(label): """ Check if a test label points to a python package or file directory. + + Relative labels like "." and ".." are seen as directories. """ try: mod = import_module(label) - except ImportError: + except (ImportError, TypeError): pass else: return hasattr(mod, '__path__') |
