~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_globbing.py

  • Committer: Martin Pool
  • Date: 2011-03-28 01:28:09 UTC
  • mto: (5425.4.19 220464-stale-locks)
  • mto: This revision was merged to the branch mainline in revision 5970.
  • Revision ID: mbp@canonical.com-20110328012809-frw003r09tcrxkiz
Represent lock held info as an object, not just a dict

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2011 Canonical Ltd
 
1
# Copyright (C) 2006-2010 Canonical Ltd
2
2
# -*- coding: utf-8 -*-
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
26
26
    )
27
27
from bzrlib.tests import (
28
28
    TestCase,
 
29
    TestCaseInTempDir,
29
30
    )
30
31
 
31
32
 
37
38
                glob = glob_prefix + glob
38
39
            globster = Globster([glob])
39
40
            for name in positive:
40
 
                self.assertTrue(globster.match(name), repr(
 
41
                self.failUnless(globster.match(name), repr(
41
42
                    u'name "%s" does not match glob "%s" (re=%s)' %
42
43
                    (name, glob, globster._regex_patterns[0][0].pattern)))
43
44
            for name in negative:
44
 
                self.assertFalse(globster.match(name), repr(
 
45
                self.failIf(globster.match(name), repr(
45
46
                    u'name "%s" does match glob "%s" (re=%s)' %
46
47
                    (name, glob, globster._regex_patterns[0][0].pattern)))
47
48