Ticket #19156: django-test-suite.patch

File django-test-suite.patch, 792 bytes (added by Aigars Mahinovs, 11 years ago)

Quick and rough fix for the bug

  • test/simple.py

     
    135135        # TestClass isn't a TestClass - it must be a method or normal class
    136136        pass
    137137
     138
     139    # Try to find the test via the test suite
     140    test_suite = build_suite(app_module)
     141    for sub_suite in test_suite:
     142        for sub_sub_suite in sub_suite:
     143            for test in sub_sub_suite:
     144                if str(test.__class__.__name__) == parts[1]:
     145                    if len(parts) == 2:
     146                        return unittest.TestLoader().loadTestsFromTestCase(test.__class__)
     147                    else:
     148                        return test.__class__(parts[2])
     149
    138150    #
    139151    # If there isn't a TestCase, look for a doctest that matches
    140152    #
Back to Top