~bzr-upload-devs/bzr-upload/trunk

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Vincent Ladeuil
  • Date: 2008-05-21 10:22:36 UTC
  • mto: This revision was merged to the branch mainline in revision 39.
  • Revision ID: v.ladeuil+lp@free.fr-20080521102236-oqvd1artomogv89f
Create a simple setup.py and rework tests modules accordingly.

* tests/test_upload.py:
Renamed from test_upload.py.

* tests/__init__.py: 
New file.

* setup.py: 
New file.

* __init__.py:
(load_tests): Simplified.

Show diffs side-by-side

added added

removed removed

Lines of Context:
314
314
 
315
315
 
316
316
def load_tests(basic_tests, module, loader):
317
 
    result = loader.suiteClass()
318
 
    # add the tests for this module
319
 
 
320
317
    # This module shouldn't define any tests but I don't know how to report
321
 
    # that. I prefer to keep the add Tests to detect unwanted tests and I think
322
 
    # that's sufficient.
323
 
    result.addTests(basic_tests)
 
318
    # that. I prefer to update basic_tests with the other tests to detect
 
319
    # unwanted tests and I think that's sufficient.
324
320
 
325
321
    testmod_names = [
326
 
        'test_upload',
 
322
        'tests',
327
323
        ]
328
 
    result.addTest(loader.loadTestsFromModuleNames(
 
324
    basic_tests.addTest(loader.loadTestsFromModuleNames(
329
325
            ["%s.%s" % (__name__, tmn) for tmn in testmod_names]))
330
 
    return result
 
326
    return basic_tests