From 18d962f2e6cc8829d60d6f6dfb3ee3855fa5362e Mon Sep 17 00:00:00 2001 From: Preston Timmons Date: Tue, 31 Dec 2013 11:41:34 -0600 Subject: Fixed #21206 -- Fixed test discovery without labels Added test to verify an empty label performs discovery on the current working directory. --- django/test/runner.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'django') 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__') -- cgit v1.3