Bug 1645066 - mozlint/clippy: update of the test to reflect the new output r=marco
authorSylvestre Ledru <sledru@mozilla.com>
Tue, 16 Jun 2020 18:54:54 +0000
changeset 535945 97fab3ff3e3d119c60566d6834b5e52d236eb0e6
parent 535944 b227b6867c4c33dab264ede2ab8cfb6cca7c4f99
child 535946 067534a9f4d40d1e1d952980eff478fd28021e88
push id119167
push usersledru@mozilla.com
push dateTue, 16 Jun 2020 19:26:05 +0000
treeherderautoland@067534a9f4d4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarco
bugs1645066
milestone79.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 1645066 - mozlint/clippy: update of the test to reflect the new output r=marco Differential Revision: https://phabricator.services.mozilla.com/D79436
tools/lint/test/test_clippy.py
--- a/tools/lint/test/test_clippy.py
+++ b/tools/lint/test/test_clippy.py
@@ -7,17 +7,17 @@ LINTER = 'clippy'
 def test_basic(lint, config, paths):
     results = lint(paths("test1/"))
     print(results)
     assert len(results) > 7
 
     assert "is never read" in results[0].message or 'but never used' in results[0].message
     assert results[0].level == "warning"
     assert results[0].lineno == 7
-    assert results[0].column == 13
+    assert results[0].column == 9
     assert results[0].rule == "unused_assignments"
     assert results[0].relpath == "test1/bad.rs"
     assert "tools/lint/test/files/clippy/test1/bad.rs" in results[0].path
 
     assert "value assigned to `b` is never read" in results[1].message
     assert results[1].level == "warning"
     assert results[1].relpath == "test1/bad.rs"
 
@@ -48,41 +48,41 @@ def test_file_and_path_provided(lint, co
     # even if clippy analyzed it
     # we should not have anything from bad_2.rs
     # as mozlint is filtering out the file
     print(results)
     assert len(results) > 16
     assert "value assigned to `a` is never read" in results[0].message
     assert results[0].level == "warning"
     assert results[0].lineno == 7
-    assert results[0].column == 13
+    assert results[0].column == 9
     assert results[0].rule == "unused_assignments"
     assert results[0].relpath == "test1/bad.rs"
     assert "tools/lint/test/files/clippy/test1/bad.rs" in results[0].path
     assert "value assigned to `a` is never read" in results[0].message
     assert results[8].level == "warning"
     assert results[8].lineno == 9
-    assert results[8].column == 13
+    assert results[8].column == 9
     assert results[8].rule == "unused_assignments"
     assert results[8].relpath == "test2/src/bad_1.rs"
     assert "tools/lint/test/files/clippy/test2/src/bad_1.rs" in results[8].path
     for r in results:
         assert "bad_2.rs" not in r.relpath
 
 
 def test_file_provided(lint, config, paths):
     results = lint(paths("./test2/src/bad_1.rs"))
     # even if clippy analyzed it
     # we should not have anything from bad_2.rs
     # as mozlint is filtering out the file
     print(results)
     assert len(results) > 8
     assert results[0].level == "warning"
     assert results[0].lineno == 9
-    assert results[0].column == 13
+    assert results[0].column == 9
     assert results[0].rule == "unused_assignments"
     assert results[0].relpath == "test2/src/bad_1.rs"
     assert "tools/lint/test/files/clippy/test2/src/bad_1.rs" in results[0].path
     for r in results:
         assert "bad_2.rs" not in r.relpath
 
 
 def test_cleanup(lint, paths, root):