aboutsummaryrefslogtreecommitdiffstats
path: root/python/tidy/servo_tidy_tests
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2020-05-20 14:19:47 -0400
committerJosh Matthews <josh@joshmatthews.net>2020-05-20 14:19:47 -0400
commit4fec98722158e9816a4b3f83c7f6e38abcc5fa50 (patch)
tree58affe17934c296d4cca82e19a20094f1d375f54 /python/tidy/servo_tidy_tests
parent1f4acb940bdfb23fe3f8bbadaaa690663adcfaac (diff)
downloadservo-4fec98722158e9816a4b3f83c7f6e38abcc5fa50.tar.gz
servo-4fec98722158e9816a4b3f83c7f6e38abcc5fa50.zip
Fix output of test-tidy with duplicated packages.
Diffstat (limited to 'python/tidy/servo_tidy_tests')
-rw-r--r--python/tidy/servo_tidy_tests/duplicated_package.lock5
-rw-r--r--python/tidy/servo_tidy_tests/test_tidy.py9
2 files changed, 9 insertions, 5 deletions
diff --git a/python/tidy/servo_tidy_tests/duplicated_package.lock b/python/tidy/servo_tidy_tests/duplicated_package.lock
index 6075f99164c..22acce4257c 100644
--- a/python/tidy/servo_tidy_tests/duplicated_package.lock
+++ b/python/tidy/servo_tidy_tests/duplicated_package.lock
@@ -17,13 +17,16 @@ name = "test2"
version = "0.1.0"
source = "git+https://github.com/user/test2#c54edsf"
dependencies = [
- "test 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)",
+ "test 0.4.9",
]
[[package]]
name = "test3"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
+dependencies = [
+ "test 0.5.1",
+]
[[package]]
name = "test3"
diff --git a/python/tidy/servo_tidy_tests/test_tidy.py b/python/tidy/servo_tidy_tests/test_tidy.py
index 12f384b8674..3189250143a 100644
--- a/python/tidy/servo_tidy_tests/test_tidy.py
+++ b/python/tidy/servo_tidy_tests/test_tidy.py
@@ -195,14 +195,15 @@ class CheckTidiness(unittest.TestCase):
errors = tidy.collect_errors_for_files(iterFile('duplicated_package.lock'), [tidy.check_lock], [], print_text=False)
msg = """duplicate versions for package `test`
\t\x1b[93mThe following packages depend on version 0.4.9 from 'crates.io':\x1b[0m
-\t\ttest2
-\t\x1b[93mThe following packages depend on version 0.5.1 from 'crates.io':\x1b[0m"""
+\t\ttest2 0.1.0
+\t\x1b[93mThe following packages depend on version 0.5.1 from 'crates.io':\x1b[0m
+\t\ttest3 0.5.1"""
self.assertEqual(msg, next(errors)[2])
msg2 = """duplicate versions for package `test3`
\t\x1b[93mThe following packages depend on version 0.5.1 from 'crates.io':\x1b[0m
-\t\ttest4
+\t\ttest4 0.1.0
\t\x1b[93mThe following packages depend on version 0.5.1 from 'https://github.com/user/test3':\x1b[0m
-\t\ttest5"""
+\t\ttest5 0.1.0"""
self.assertEqual(msg2, next(errors)[2])
self.assertNoMoreErrors(errors)