Bug 1454920 [wpt PR 10518] - Avoid FutureWarnings in test_sourcefile.py., a=testonly
authorMs2ger <Ms2ger@gmail.com>
Fri, 27 Apr 2018 20:45:18 +0000
changeset 472281 c9385158fbe9f6e15d7d169ef9c5b268cbda7fb2
parent 472280 5044215d0c51adb531a02cd5fdb84dbe3cc630ad
child 472282 bfcaffd393b7fb32108fb81f092f6bcef8cd24b9
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1454920, 10518
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1454920 [wpt PR 10518] - Avoid FutureWarnings in test_sourcefile.py., a=testonly Automatic update from web-platform-testsAvoid FutureWarnings in test_sourcefile.py. (#10518) These lines of code triggered the following warning: > FutureWarning: The behavior of this method will change in future versions. > Use specific 'len(elem)' or 'elem is not None' test instead. -- wpt-commits: 4a7f047bde7fef6a753abcfc6393770db2c6569a wpt-pr: 10518
testing/web-platform/tests/tools/manifest/tests/test_sourcefile.py
--- a/testing/web-platform/tests/tools/manifest/tests/test_sourcefile.py
+++ b/testing/web-platform/tests/tools/manifest/tests/test_sourcefile.py
@@ -390,17 +390,17 @@ def test_testharness_svg():
 
     assert not s.name_is_non_test
     assert not s.name_is_manual
     assert not s.name_is_visual
     assert not s.name_is_multi_global
     assert not s.name_is_worker
     assert not s.name_is_reference
 
-    assert s.root
+    assert s.root is not None
     assert s.content_is_testharness
 
     assert items(s) == [("testharness", "/" + filename)]
 
 
 def test_relative_testharness_svg():
     content = b"""\
 <?xml version="1.0" encoding="UTF-8"?>
@@ -419,17 +419,17 @@ def test_relative_testharness_svg():
 
     assert not s.name_is_non_test
     assert not s.name_is_manual
     assert not s.name_is_visual
     assert not s.name_is_multi_global
     assert not s.name_is_worker
     assert not s.name_is_reference
 
-    assert s.root
+    assert s.root is not None
     assert not s.content_is_testharness
 
     assert items(s) == []
 
 
 @pytest.mark.parametrize("filename", ["test", "test.test"])
 def test_testharness_ext(filename):
     content = b"<script src=/resources/testharness.js></script>"