Skip to content

Commit 3f6df32

Browse files
committed
Fix formatting errors using format-incremental
1 parent 4792ff2 commit 3f6df32

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

src/openfermion/linalg/davidson_test.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,10 @@ def test_get_lowest_y_real_fail(self):
438438
initial_guess = 1.0j * numpy.random.rand(dimension, n_lowest)
439439
numpy.random.seed(dimension * 2)
440440
initial_guess += numpy.random.rand(dimension, n_lowest)
441-
with pytest.warns(RuntimeWarning, match=("Unable to get real only eigenvectors"
442-
"|Initial guess is not real only!")):
441+
with pytest.warns(
442+
RuntimeWarning,
443+
match=("Unable to get real only eigenvectors" "|Initial guess is not real only!"),
444+
):
443445
success, _, eigen_vectors = davidson.get_lowest_n(
444446
n_lowest, initial_guess, max_iterations=10
445447
)
@@ -462,8 +464,10 @@ def test_get_lowest_y_real(self):
462464
initial_guess = 1.0j * numpy.random.rand(dimension, n_lowest)
463465
numpy.random.seed(dimension * 2)
464466
initial_guess += numpy.random.rand(dimension, n_lowest)
465-
with pytest.warns(RuntimeWarning, match=("Unable to get real only eigenvectors"
466-
"|Initial guess is not real only!")):
467+
with pytest.warns(
468+
RuntimeWarning,
469+
match=("Unable to get real only eigenvectors" "|Initial guess is not real only!"),
470+
):
467471
success, eigen_values, eigen_vectors = davidson.get_lowest_n(
468472
n_lowest, initial_guess, max_iterations=10
469473
)
@@ -493,8 +497,10 @@ def test_get_lowest_y_complex(self):
493497
initial_guess = 1.0j * numpy.random.rand(dimension, n_lowest)
494498
numpy.random.seed(dimension * 2)
495499
initial_guess += numpy.random.rand(dimension, n_lowest)
496-
with pytest.warns(RuntimeWarning, match=("Unable to get real only eigenvectors"
497-
"|Initial guess is not real only!")):
500+
with pytest.warns(
501+
RuntimeWarning,
502+
match=("Unable to get real only eigenvectors" "|Initial guess is not real only!"),
503+
):
498504
success, eigen_values, eigen_vectors = davidson.get_lowest_n(
499505
n_lowest, initial_guess, max_iterations=10
500506
)

0 commit comments

Comments
 (0)