mirror of
https://github.com/servo/servo.git
synced 2025-08-14 18:05:36 +01:00
Update web-platform-tests to revision 614fd870e47c9f4e76291e5af4e32b676c0acac0
This commit is contained in:
parent
063bd7ac19
commit
b49ffaa0f7
137 changed files with 4756 additions and 721 deletions
|
@ -71,6 +71,9 @@ def all_filesystem_paths(repo_root, subdir=None):
|
|||
for dirpath, dirnames, filenames in path_filter(walk(expanded_path)):
|
||||
for filename, _ in filenames:
|
||||
path = os.path.join(dirpath, filename)
|
||||
if subdir:
|
||||
path = os.path.join(subdir, path)
|
||||
assert not os.path.isabs(path), path
|
||||
yield path
|
||||
|
||||
|
||||
|
|
|
@ -415,6 +415,23 @@ def test_all_filesystem_paths():
|
|||
os.path.join('dir_a', 'file_d')]
|
||||
|
||||
|
||||
def test_filesystem_paths_subdir():
|
||||
with mock.patch(
|
||||
'tools.lint.lint.walk',
|
||||
return_value=[('',
|
||||
[('dir_a', None), ('dir_b', None)],
|
||||
[('file_a', None), ('file_b', None)]),
|
||||
('dir_a',
|
||||
[],
|
||||
[('file_c', None), ('file_d', None)])]
|
||||
):
|
||||
got = list(lint_mod.all_filesystem_paths('.', 'dir'))
|
||||
assert got == [os.path.join('dir', 'file_a'),
|
||||
os.path.join('dir', 'file_b'),
|
||||
os.path.join('dir', 'dir_a', 'file_c'),
|
||||
os.path.join('dir', 'dir_a', 'file_d')]
|
||||
|
||||
|
||||
def test_main_with_args():
|
||||
orig_argv = sys.argv
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue