mirror of
https://github.com/servo/servo.git
synced 2025-08-02 04:00:32 +01:00
Fix output of test-tidy with duplicated packages.
This commit is contained in:
parent
1f4acb940b
commit
4fec987221
3 changed files with 16 additions and 10 deletions
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue