/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/__init__.py

  • Committer: Aaron Bentley
  • Date: 2006-06-15 20:20:48 UTC
  • mfrom: (1776 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1788.
  • Revision ID: abentley@panoramicfeedback.com-20060615202048-fcee4d87e363a002
Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
484
484
            raise AssertionError('pattern "%s" not found in "%s"'
485
485
                    % (needle_re, haystack))
486
486
 
 
487
    def assertNotContainsRe(self, haystack, needle_re):
 
488
        """Assert that a does not match a regular expression"""
 
489
        if re.search(needle_re, haystack):
 
490
            raise AssertionError('pattern "%s" found in "%s"'
 
491
                    % (needle_re, haystack))
 
492
 
487
493
    def assertSubset(self, sublist, superlist):
488
494
        """Assert that every entry in sublist is present in superlist."""
489
495
        missing = []
729
735
        this isolation: e.g. they are testing startup time, or signal
730
736
        handling, or early startup code, etc.  Subprocess code can't be 
731
737
        profiled or debugged so easily.
 
738
 
 
739
        :param retcode: The status code that is expected.  Defaults to 0.  If
 
740
        None is supplied, the status code is not checked.
732
741
        """
733
742
        bzr_path = os.path.dirname(os.path.dirname(bzrlib.__file__))+'/bzr'
734
 
        if len(args) == 1:
735
 
            args = shlex.split(args[0])
736
743
        args = list(args)
737
744
        process = Popen([sys.executable, bzr_path]+args, stdout=PIPE, 
738
745
                         stderr=PIPE)