Skip to content

Commit 1164461

Browse files
jgrahampull[bot]
authored andcommitted
Fix unittest
1 parent 24fbe02 commit 1164461

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

tools/wptrunner/wptrunner/tests/test_testloader.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -248,14 +248,14 @@ def test_loader_filter_tags():
248248
loader = TestLoader({manifest: {"metadata_path": metadata_path}}, ["testharness"], None)
249249
assert len(loader.tests["testharness"]) == 4
250250

251-
# Check: specifying a single `test-include` inclusion yields `/a/bar`
251+
# Check: specifying a single `test-include` inclusion yields `/a/bar` and `/b/baz`
252252
loader = TestLoader({manifest: {"metadata_path": metadata_path}}, ["testharness"], None,
253-
test_filters=[TagFilter({"test-include"})])
254-
assert len(loader.tests["testharness"]) == 1
253+
test_filters=[TagFilter({"test-include"}, {})])
254+
assert len(loader.tests["testharness"]) == 2
255255
assert loader.tests["testharness"][0].id == "/a/bar.html"
256256
assert loader.tests["testharness"][0].tags == {"dir:a", "test-include"}
257257
assert loader.tests["testharness"][1].id == "/b/baz.html"
258-
assert loader.tests["testharness"][1].tags == {"dir:b", "test-include"}
258+
assert loader.tests["testharness"][1].tags == {"dir:b", "test-include", "test-exclude"}
259259

260260
# Check: specifying a single `test-exclude` exclusion rejects only `/b/baz`
261261
loader = TestLoader({manifest: {"metadata_path": metadata_path}}, ["testharness"], None,
@@ -274,13 +274,11 @@ def test_loader_filter_tags():
274274

275275
loader = TestLoader({manifest: {"metadata_path": metadata_path}}, ["testharness"], None,
276276
test_filters=[TagFilter({"test-include"}, {"test-include"})])
277-
assert (len(loader.tests["testharness"] == 0))
277+
assert len(loader.tests["testharness"]) == 0
278278

279279
loader = TestLoader({manifest: {"metadata_path": metadata_path}}, ["testharness"], None,
280280
test_filters=[TagFilter({"test-include", "test-exclude"}, {"test-include"})])
281-
assert len(loader.tests["testharness"]) == 1
282-
assert loader.tests["testharness"][0].id == "/b/baz.html"
283-
assert loader.tests["testharness"][0].tags == {"dir:b", "test-include", "test-exclude"}
281+
assert len(loader.tests["testharness"]) == 0
284282

285283

286284
def test_chunk_hash(manifest):

0 commit comments

Comments
 (0)