summaryrefslogtreecommitdiff
path: root/numpy/linalg/tests
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2020-12-13 14:14:49 -0700
committerGitHub <noreply@github.com>2020-12-13 14:14:49 -0700
commit3fe2d9d2627fc0f84aeed293ff8afa7c1f08d899 (patch)
tree2ea27fe06a19c39e8d7a5fe2f87cb7e05363247d /numpy/linalg/tests
parent7d7e446fcbeeff70d905bde2eb0264a797488280 (diff)
parenteff302e5e8678fa17fb3d8156d49eb585b0876d9 (diff)
downloadnumpy-3fe2d9d2627fc0f84aeed293ff8afa7c1f08d899.tar.gz
Merge branch 'master' into fix-issue-10244
Diffstat (limited to 'numpy/linalg/tests')
-rw-r--r--numpy/linalg/tests/test_build.py4
-rw-r--r--numpy/linalg/tests/test_linalg.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/numpy/linalg/tests/test_build.py b/numpy/linalg/tests/test_build.py
index cbf3089bc..4859226d9 100644
--- a/numpy/linalg/tests/test_build.py
+++ b/numpy/linalg/tests/test_build.py
@@ -16,13 +16,13 @@ class FindDependenciesLdd:
p = Popen(self.cmd, stdout=PIPE, stderr=PIPE)
stdout, stderr = p.communicate()
except OSError:
- raise RuntimeError("command %s cannot be run" % self.cmd)
+ raise RuntimeError(f'command {self.cmd} cannot be run')
def get_dependencies(self, lfile):
p = Popen(self.cmd + [lfile], stdout=PIPE, stderr=PIPE)
stdout, stderr = p.communicate()
if not (p.returncode == 0):
- raise RuntimeError("failed dependencies check for %s" % lfile)
+ raise RuntimeError(f'failed dependencies check for {lfile}')
return stdout
diff --git a/numpy/linalg/tests/test_linalg.py b/numpy/linalg/tests/test_linalg.py
index 3f3bf9f70..21fab58e1 100644
--- a/numpy/linalg/tests/test_linalg.py
+++ b/numpy/linalg/tests/test_linalg.py
@@ -85,7 +85,7 @@ class LinalgCase:
do(self.a, self.b, tags=self.tags)
def __repr__(self):
- return "<LinalgCase: %s>" % (self.name,)
+ return f'<LinalgCase: {self.name}>'
def apply_tag(tag, cases):
@@ -349,7 +349,7 @@ class LinalgTestCase:
try:
case.check(self.do)
except Exception:
- msg = "In test case: %r\n\n" % case
+ msg = f'In test case: {case!r}\n\n'
msg += traceback.format_exc()
raise AssertionError(msg)
@@ -1732,7 +1732,7 @@ class TestCholesky:
b = np.matmul(c, c.transpose(t).conj())
assert_allclose(b, a,
- err_msg="{} {}\n{}\n{}".format(shape, dtype, a, c),
+ err_msg=f'{shape} {dtype}\n{a}\n{c}',
atol=500 * a.shape[0] * np.finfo(dtype).eps)
def test_0_size(self):