/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: Vincent Ladeuil
  • Date: 2008-01-23 16:25:18 UTC
  • mfrom: (3193.1.12 selftest)
  • mto: This revision was merged to the branch mainline in revision 3199.
  • Revision ID: v.ladeuil+lp@free.fr-20080123162518-2idbvqo9kqg75u3k
Add --load-list option to selftest

Show diffs side-by-side

added added

removed removed

Lines of Context:
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)