comparison tests/test-match.py @ 33582:44bc181b9835 stable

match: override visitdir() in nevermatcher to return False When we changed basematcher.visitdir() in cf15c3cc304c (match: make base matcher return True for visitdir, 2017-07-14), we forgot to add an override in nevermatcher. This led to tests failing in narrowhg. As Durham pointed out, it's high time to add unit tests for the matcher, so this patch also adds a first unit test. Differential Revision: https://phab.mercurial-scm.org/D151
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 19 Jul 2017 14:50:50 -0700
parents
children 987d3a4b989f
comparison
equal deleted inserted replaced
33581:e12c3049af8e 33582:44bc181b9835
1 from __future__ import absolute_import
2
3 import unittest
4
5 import silenttestrunner
6
7 from mercurial import (
8 match as matchmod,
9 )
10
11 class NeverMatcherTests(unittest.TestCase):
12
13 def testVisitdir(self):
14 m = matchmod.nevermatcher('', '')
15 self.assertFalse(m.visitdir('.'))
16 self.assertFalse(m.visitdir('dir'))
17
18 if __name__ == '__main__':
19 silenttestrunner.main(__name__)