summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorPreston Timmons <prestontimmons@gmail.com>2013-12-31 11:41:34 -0600
committerClaude Paroz <claude@2xlibre.net>2014-01-01 12:40:16 +0100
commit18d962f2e6cc8829d60d6f6dfb3ee3855fa5362e (patch)
treef7fc7d16fae609acbaa58564dadb9c0889862f7f /django
parentfbbe7ca30c9bd4c1f1d4611118da6c746be89566 (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.py4
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__')