#25542: Discover runner will raise AttributeError when test modules raise
ImportError
-----------------------------------+--------------------
     Reporter:  hirokiky           |      Owner:  nobody
         Type:  Bug                |     Status:  new
    Component:  Testing framework  |    Version:  master
     Severity:  Normal             |   Keywords:
 Triage Stage:  Unreviewed         |  Has patch:  1
Easy pickings:  0                  |      UI/UX:  0
-----------------------------------+--------------------
 When test modules raise ImportError, the discover runner will raise
 AttributeError.
 It's difficult to detect the error reason.

 I added a patch to check this problem.

 {{{
 ERROR: test_import_error_in_tests_module
 (test_runner.test_discover_runner.DiscoverRunnerTest)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File
 "/home/hirokiky/dev/django/django/tests/test_runner/test_discover_runner.py",
 line 172, in test_import_error_in_tests_module
     ["test_discovery_sample.tests_discovery_import_error"],
   File "/home/hirokiky/dev/django/django/django/test/runner.py", line 422,
 in build_suite
     tests = self.test_loader.loadTestsFromName(label)
   File "/usr/lib/python2.7/unittest/loader.py", line 100, in
 loadTestsFromName
     parent, obj = obj, getattr(obj, part)
 AttributeError: 'module' object has no attribute
 'tests_discovery_import_error'

 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25542>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.a62a58e0ba5dbbd81e8f07c47a1e9eae%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to