~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: John Arbash Meinel
  • Date: 2005-11-23 15:44:24 UTC
  • mto: (1185.50.19 bzr-jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1512.
  • Revision ID: john@arbash-meinel.com-20051123154424-a02f8bf990a1fed5
Renamed all of the tests from selftest/foo.py to tests/test_foo.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
import bzrlib.commands
33
33
import bzrlib.trace
34
34
import bzrlib.osutils as osutils
35
 
from bzrlib.selftest import TestUtil
36
 
from bzrlib.selftest.TestUtil import TestLoader, TestSuite
37
 
from bzrlib.selftest.treeshape import build_tree_contents
 
35
from bzrlib.tests import TestUtil
 
36
from bzrlib.tests.TestUtil import TestLoader, TestSuite
 
37
from bzrlib.tests.treeshape import build_tree_contents
38
38
from bzrlib.errors import BzrError
39
39
 
40
40
MODULES_TO_TEST = []
86
86
                what = what[:67] + '...'
87
87
        else:
88
88
            what = test.id()
89
 
            if what.startswith('bzrlib.selftest.'):
 
89
            if what.startswith('bzrlib.tests.'):
90
90
                what = what[16:]
91
91
            if len(what) > 70:
92
92
                what = '...' + what[-67:]
486
486
        super(TestCaseInTempDir, self).setUp()
487
487
        self._make_test_root()
488
488
        _currentdir = os.getcwdu()
489
 
        short_id = self.id().replace('bzrlib.selftest.', '') \
 
489
        short_id = self.id().replace('bzrlib.tests.', '') \
490
490
                   .replace('__main__.', '')
491
491
        self.test_dir = os.path.join(self.TEST_ROOT, short_id)
492
492
        os.mkdir(self.test_dir)
524
524
                f.close()
525
525
 
526
526
    def build_tree_contents(self, shape):
527
 
        bzrlib.selftest.build_tree_contents(shape)
 
527
        bzrlib.tests.build_tree_contents(shape)
528
528
 
529
529
    def failUnlessExists(self, path):
530
530
        """Fail unless path, which may be abs or relative, exists."""
596
596
    # exception is hidden by unittest.  Sucks.  Should either fix that or
597
597
    # perhaps import them and pass them to unittest as modules.
598
598
    testmod_names = \
599
 
                  ['bzrlib.selftest.MetaTestLog',
600
 
                   'bzrlib.selftest.api',
601
 
                   'bzrlib.selftest.gpg',
602
 
                   'bzrlib.selftest.identitymap',
603
 
                   'bzrlib.selftest.inv',
604
 
                   'bzrlib.selftest.ancestry',
605
 
                   'bzrlib.selftest.commit',
606
 
                   'bzrlib.selftest.command',
607
 
                   'bzrlib.selftest.commit_merge',
608
 
                   'bzrlib.selftest.config',
609
 
                   'bzrlib.selftest.merge3',
610
 
                   'bzrlib.selftest.merge',
611
 
                   'bzrlib.selftest.hashcache',
612
 
                   'bzrlib.selftest.status',
613
 
                   'bzrlib.selftest.log',
614
 
                   'bzrlib.selftest.revisionnamespaces',
615
 
                   'bzrlib.selftest.branch',
616
 
                   'bzrlib.selftest.revision',
617
 
                   'bzrlib.selftest.revision_info',
618
 
                   'bzrlib.selftest.merge_core',
619
 
                   'bzrlib.selftest.smart_add',
620
 
                   'bzrlib.selftest.bad_files',
621
 
                   'bzrlib.selftest.diff',
622
 
                   'bzrlib.selftest.parent',
623
 
                   'bzrlib.selftest.xml',
624
 
                   'bzrlib.selftest.weave',
625
 
                   'bzrlib.selftest.fetch',
626
 
                   'bzrlib.selftest.whitebox',
627
 
                   'bzrlib.selftest.store',
628
 
                   'bzrlib.selftest.blackbox',
629
 
                   'bzrlib.selftest.blackbox.versioning',
630
 
                   'bzrlib.selftest.sampler',
631
 
                   'bzrlib.selftest.transactions',
632
 
                   'bzrlib.selftest.transport',
633
 
                   'bzrlib.selftest.sftp',
634
 
                   'bzrlib.selftest.graph',
635
 
                   'bzrlib.selftest.workingtree',
636
 
                   'bzrlib.selftest.upgrade',
637
 
                   'bzrlib.selftest.uncommit',
638
 
                   'bzrlib.selftest.conflicts',
639
 
                   'bzrlib.selftest.testament',
640
 
                   'bzrlib.selftest.annotate',
641
 
                   'bzrlib.selftest.revprops',
642
 
                   'bzrlib.selftest.options',
643
 
                   'bzrlib.selftest.http',
644
 
                   'bzrlib.selftest.nonascii',
645
 
                   'bzrlib.selftest.reweave',
646
 
                   'bzrlib.selftest.tsort',
647
 
                   'bzrlib.selftest.trace',
 
599
                  ['bzrlib.tests.MetaTestLog',
 
600
                   'bzrlib.tests.test_api',
 
601
                   'bzrlib.tests.test_gpg',
 
602
                   'bzrlib.tests.test_identitymap',
 
603
                   'bzrlib.tests.test_inv',
 
604
                   'bzrlib.tests.test_ancestry',
 
605
                   'bzrlib.tests.test_commit',
 
606
                   'bzrlib.tests.test_command',
 
607
                   'bzrlib.tests.test_commit_merge',
 
608
                   'bzrlib.tests.test_config',
 
609
                   'bzrlib.tests.test_merge3',
 
610
                   'bzrlib.tests.test_merge',
 
611
                   'bzrlib.tests.test_hashcache',
 
612
                   'bzrlib.tests.test_status',
 
613
                   'bzrlib.tests.test_log',
 
614
                   'bzrlib.tests.test_revisionnamespaces',
 
615
                   'bzrlib.tests.test_branch',
 
616
                   'bzrlib.tests.test_revision',
 
617
                   'bzrlib.tests.test_revision_info',
 
618
                   'bzrlib.tests.test_merge_core',
 
619
                   'bzrlib.tests.test_smart_add',
 
620
                   'bzrlib.tests.test_bad_files',
 
621
                   'bzrlib.tests.test_diff',
 
622
                   'bzrlib.tests.test_parent',
 
623
                   'bzrlib.tests.test_xml',
 
624
                   'bzrlib.tests.test_weave',
 
625
                   'bzrlib.tests.test_fetch',
 
626
                   'bzrlib.tests.test_whitebox',
 
627
                   'bzrlib.tests.test_store',
 
628
                   'bzrlib.tests.blackbox',
 
629
                   'bzrlib.tests.blackbox.versioning',
 
630
                   'bzrlib.tests.test_sampler',
 
631
                   'bzrlib.tests.test_transactions',
 
632
                   'bzrlib.tests.test_transport',
 
633
                   'bzrlib.tests.test_sftp',
 
634
                   'bzrlib.tests.test_graph',
 
635
                   'bzrlib.tests.test_workingtree',
 
636
                   'bzrlib.tests.test_upgrade',
 
637
                   'bzrlib.tests.test_uncommit',
 
638
                   'bzrlib.tests.test_conflicts',
 
639
                   'bzrlib.tests.test_testament',
 
640
                   'bzrlib.tests.test_annotate',
 
641
                   'bzrlib.tests.test_revprops',
 
642
                   'bzrlib.tests.test_options',
 
643
                   'bzrlib.tests.test_http',
 
644
                   'bzrlib.tests.test_nonascii',
 
645
                   'bzrlib.tests.test_reweave',
 
646
                   'bzrlib.tests.test_tsort',
 
647
                   'bzrlib.tests.test_trace',
648
648
                   ]
649
649
 
650
650
    for m in (bzrlib.store, bzrlib.inventory, bzrlib.branch,