Refactor: Replace copy_extra_entry() with copy_asset()

This commit is contained in:
Takeshi KOMIYA
2016-07-03 15:45:01 +09:00
parent 829b5631a3
commit bb1e6f9044
7 changed files with 38 additions and 39 deletions

View File

@@ -8,7 +8,7 @@
:copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from sphinx.util.matching import compile_matchers
from sphinx.util.matching import compile_matchers, Matcher
def test_compile_matchers():
@@ -81,3 +81,11 @@ def test_compile_matchers():
pat = compile_matchers(['hello[!].py']).pop()
assert pat('hello[!].py')
assert not pat('hello.py')
def test_Matcher():
matcher = Matcher(['hello.py', '**/world.py'])
assert matcher('hello.py')
assert not matcher('subdir/hello.py')
assert matcher('world.py')
assert matcher('subdir/world.py')