summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2022-07-25 16:24:52 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2022-07-31 13:29:20 -0700
commitc661ca248b53f8bc2211a5fff2c4065901ed3ae5 (patch)
treec1d8db5c302870fbd2fbd96d9b053911b2abc1ab
parentf52f6e99dbf1131886a80112b8c79dfc414afb7c (diff)
downloadspack-c661ca248b53f8bc2211a5fff2c4065901ed3ae5.tar.gz
spack-c661ca248b53f8bc2211a5fff2c4065901ed3ae5.tar.bz2
spack-c661ca248b53f8bc2211a5fff2c4065901ed3ae5.tar.xz
spack-c661ca248b53f8bc2211a5fff2c4065901ed3ae5.zip
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.
-rw-r--r--lib/spack/spack/test/cmd/blame.py2
-rw-r--r--lib/spack/spack/test/cmd/pkg.py2
-rw-r--r--lib/spack/spack/test/llnl/util/lang.py10
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/spack/spack/test/cmd/blame.py b/lib/spack/spack/test/cmd/blame.py
index d33abbf6ae..008b42dd03 100644
--- a/lib/spack/spack/test/cmd/blame.py
+++ b/lib/spack/spack/test/cmd/blame.py
@@ -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
diff --git a/lib/spack/spack/test/cmd/pkg.py b/lib/spack/spack/test/cmd/pkg.py
index 141b3dd937..781d531a0b 100644
--- a/lib/spack/spack/test/cmd/pkg.py
+++ b/lib/spack/spack/test/cmd/pkg.py
@@ -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")
diff --git a/lib/spack/spack/test/llnl/util/lang.py b/lib/spack/spack/test/llnl/util/lang.py
index c299e690a0..94b067f3dc 100644
--- a/lib/spack/spack/test/llnl/util/lang.py
+++ b/lib/spack/spack/test/llnl/util/lang.py
@@ -306,16 +306,16 @@ def test_grouped_exception():
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__)
)