black: fix format-sensitive tests

Some of our tests rely on single vs. double quotes, and others rely on specific
line numbers in the source. These needed fixing after the switch to Black.
This commit is contained in:
Todd Gamblin 2022-07-25 16:24:52 -07:00
parent f52f6e99db
commit c661ca248b
3 changed files with 7 additions and 7 deletions

View file

@ -77,4 +77,4 @@ def test_blame_by_git(mock_packages, capfd):
with capfd.disabled():
out = blame("--git", "mpich")
assert "class Mpich" in out
assert ' homepage = "http://www.mpich.org"' in out
assert ' homepage = "http://www.mpich.org"' in out

View file

@ -254,7 +254,7 @@ def test_pkg_source(mock_packages):
def test_pkg_canonical_source(mock_packages):
source = pkg("source", "multimethod")
assert "@when('@2.0')" in source
assert '@when("@2.0")' in source
assert "Check that multimethods work with boolean values" in source
canonical_1 = pkg("source", "--canonical", "multimethod@1.0")

View file

@ -306,16 +306,16 @@ def inner():
due to the following failures:
inner method raised ValueError: wow!
File "{0}", \
line 283, in test_grouped_exception
line 290, in test_grouped_exception
inner()
File "{0}", \
line 280, in inner
raise ValueError('wow!')
line 287, in inner
raise ValueError("wow!")
top-level raised TypeError: ok
File "{0}", \
line 286, in test_grouped_exception
raise TypeError('ok')
line 293, in test_grouped_exception
raise TypeError("ok")
"""
).format(__file__)
)