/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_selftest.py

  • Committer: Aaron Bentley
  • Date: 2008-02-24 16:42:13 UTC
  • mfrom: (3234 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3235.
  • Revision ID: aaron@aaronbentley.com-20080224164213-eza1lzru5bwuwmmj
Merge with bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
174
174
    def test_benchmark_runs_benchmark_tests(self):
175
175
        """bzr selftest --benchmark should not run the default test suite."""
176
176
        # We test this by passing a regression test name to --benchmark, which
177
 
        # should result in 0 rests run.
 
177
        # should result in 0 tests run.
178
178
        old_root = TestCaseWithMemoryTransport.TEST_ROOT
179
179
        try:
180
180
            TestCaseWithMemoryTransport.TEST_ROOT = None
558
558
            out_rand2.splitlines(), 2)
559
559
        self.assertEqual(tests_rand, tests_rand2)
560
560
 
 
561
 
 
562
class TestSelftestWithIdList(TestCaseInTempDir):
 
563
 
 
564
    def test_load_list(self):
 
565
        # We don't want to call selftest for the whole suite, so we start with
 
566
        # a reduced list.
 
567
        test_list_fname = 'test.list'
 
568
        fl = open(test_list_fname, 'wt')
 
569
        fl.write('%s\n' % self.id())
 
570
        fl.close()
 
571
        out, err = self.run_bzr(
 
572
            ['selftest', '--load-list', test_list_fname, '--list'])
 
573
        self.assertContainsRe(out, "Listed 1 test in")
 
574
 
 
575
    def test_load_unknown(self):
 
576
        out, err = self.run_bzr('selftest --load-list I_do_not_exist ',
 
577
                                retcode=3)