@@ -305,10 +305,10 @@ def test_hash_fails(tmpdir):
305
305
assert code == 0
306
306
307
307
308
- TEST_FAILING_HYBRID = f """
308
+ TEST_FAILING_HYBRID = rf """
309
309
import pytest
310
310
import matplotlib.pyplot as plt
311
- @pytest.mark.mpl_image_compare(hash_library="{ fail_hash_library } ",
311
+ @pytest.mark.mpl_image_compare(hash_library=r "{ fail_hash_library } ",
312
312
tolerance=2)
313
313
def test_hash_fail_hybrid():
314
314
fig = plt.figure()
@@ -326,7 +326,7 @@ def test_hash_fail_hybrid(tmpdir):
326
326
327
327
# Assert that image comparison runs and fails
328
328
output = assert_pytest_fails_with (['--mpl' , test_file ,
329
- f '--mpl-baseline-path={ hash_baseline_dir_abs / "fail" } ' ],
329
+ rf '--mpl-baseline-path={ hash_baseline_dir_abs / "fail" } ' ],
330
330
"doesn't match hash FAIL in library" )
331
331
assert "Error: Image files did not match." in output , output
332
332
@@ -338,7 +338,7 @@ def test_hash_fail_hybrid(tmpdir):
338
338
339
339
# Assert reports image comparison succeeds
340
340
output = assert_pytest_fails_with (['--mpl' , test_file ,
341
- f '--mpl-baseline-path={ hash_baseline_dir_abs / "succeed" } ' ],
341
+ rf '--mpl-baseline-path={ hash_baseline_dir_abs / "succeed" } ' ],
342
342
"doesn't match hash FAIL in library" )
343
343
assert "However, the comparison to the baseline image succeeded." in output , output
344
344
0 commit comments