---
source: crates/ruff_linter/src/rules/flake8_pytest_style/mod.rs
---
PT016 No message passed to `pytest.fail()`
  --> PT016.py:19:5
   |
17 | # Errors
18 | def f():
19 |     pytest.fail()
   |     ^^^^^^^^^^^
20 |     pytest.fail("")
21 |     pytest.fail(f"")
   |

PT016 No message passed to `pytest.fail()`
  --> PT016.py:20:5
   |
18 | def f():
19 |     pytest.fail()
20 |     pytest.fail("")
   |     ^^^^^^^^^^^
21 |     pytest.fail(f"")
22 |     pytest.fail(msg="")
   |

PT016 No message passed to `pytest.fail()`
  --> PT016.py:21:5
   |
19 |     pytest.fail()
20 |     pytest.fail("")
21 |     pytest.fail(f"")
   |     ^^^^^^^^^^^
22 |     pytest.fail(msg="")
23 |     pytest.fail(msg=f"")
   |

PT016 No message passed to `pytest.fail()`
  --> PT016.py:22:5
   |
20 |     pytest.fail("")
21 |     pytest.fail(f"")
22 |     pytest.fail(msg="")
   |     ^^^^^^^^^^^
23 |     pytest.fail(msg=f"")
24 |     pytest.fail(reason="")
   |

PT016 No message passed to `pytest.fail()`
  --> PT016.py:23:5
   |
21 |     pytest.fail(f"")
22 |     pytest.fail(msg="")
23 |     pytest.fail(msg=f"")
   |     ^^^^^^^^^^^
24 |     pytest.fail(reason="")
25 |     pytest.fail(reason=f"")
   |

PT016 No message passed to `pytest.fail()`
  --> PT016.py:24:5
   |
22 |     pytest.fail(msg="")
23 |     pytest.fail(msg=f"")
24 |     pytest.fail(reason="")
   |     ^^^^^^^^^^^
25 |     pytest.fail(reason=f"")
   |

PT016 No message passed to `pytest.fail()`
  --> PT016.py:25:5
   |
23 |     pytest.fail(msg=f"")
24 |     pytest.fail(reason="")
25 |     pytest.fail(reason=f"")
   |     ^^^^^^^^^^^
26 |
27 | # Skip for t-strings
   |
