---
source: crates/ruff_linter/src/rules/flake8_pytest_style/mod.rs
---
PT015 Assertion always fails, replace with `pytest.fail()`
  --> PT015.py:9:5
   |
 8 | def test_error():
 9 |     assert None
   |     ^^^^^^^^^^^
10 |     assert False
11 |     assert 0
   |

PT015 Assertion always fails, replace with `pytest.fail()`
  --> PT015.py:10:5
   |
 8 | def test_error():
 9 |     assert None
10 |     assert False
   |     ^^^^^^^^^^^^
11 |     assert 0
12 |     assert 0.0
   |

PT015 Assertion always fails, replace with `pytest.fail()`
  --> PT015.py:11:5
   |
 9 |     assert None
10 |     assert False
11 |     assert 0
   |     ^^^^^^^^
12 |     assert 0.0
13 |     assert ""
   |

PT015 Assertion always fails, replace with `pytest.fail()`
  --> PT015.py:12:5
   |
10 |     assert False
11 |     assert 0
12 |     assert 0.0
   |     ^^^^^^^^^^
13 |     assert ""
14 |     assert f""
   |

PT015 Assertion always fails, replace with `pytest.fail()`
  --> PT015.py:13:5
   |
11 |     assert 0
12 |     assert 0.0
13 |     assert ""
   |     ^^^^^^^^^
14 |     assert f""
15 |     assert []
   |

PT015 Assertion always fails, replace with `pytest.fail()`
  --> PT015.py:14:5
   |
12 |     assert 0.0
13 |     assert ""
14 |     assert f""
   |     ^^^^^^^^^^
15 |     assert []
16 |     assert ()
   |

PT015 Assertion always fails, replace with `pytest.fail()`
  --> PT015.py:15:5
   |
13 |     assert ""
14 |     assert f""
15 |     assert []
   |     ^^^^^^^^^
16 |     assert ()
17 |     assert {}
   |

PT015 Assertion always fails, replace with `pytest.fail()`
  --> PT015.py:16:5
   |
14 |     assert f""
15 |     assert []
16 |     assert ()
   |     ^^^^^^^^^
17 |     assert {}
18 |     assert list()
   |

PT015 Assertion always fails, replace with `pytest.fail()`
  --> PT015.py:17:5
   |
15 |     assert []
16 |     assert ()
17 |     assert {}
   |     ^^^^^^^^^
18 |     assert list()
19 |     assert set()
   |

PT015 Assertion always fails, replace with `pytest.fail()`
  --> PT015.py:18:5
   |
16 |     assert ()
17 |     assert {}
18 |     assert list()
   |     ^^^^^^^^^^^^^
19 |     assert set()
20 |     assert tuple()
   |

PT015 Assertion always fails, replace with `pytest.fail()`
  --> PT015.py:19:5
   |
17 |     assert {}
18 |     assert list()
19 |     assert set()
   |     ^^^^^^^^^^^^
20 |     assert tuple()
21 |     assert dict()
   |

PT015 Assertion always fails, replace with `pytest.fail()`
  --> PT015.py:20:5
   |
18 |     assert list()
19 |     assert set()
20 |     assert tuple()
   |     ^^^^^^^^^^^^^^
21 |     assert dict()
22 |     assert frozenset()
   |

PT015 Assertion always fails, replace with `pytest.fail()`
  --> PT015.py:21:5
   |
19 |     assert set()
20 |     assert tuple()
21 |     assert dict()
   |     ^^^^^^^^^^^^^
22 |     assert frozenset()
23 |     assert list([])
   |

PT015 Assertion always fails, replace with `pytest.fail()`
  --> PT015.py:22:5
   |
20 |     assert tuple()
21 |     assert dict()
22 |     assert frozenset()
   |     ^^^^^^^^^^^^^^^^^^
23 |     assert list([])
24 |     assert set(set())
   |

PT015 Assertion always fails, replace with `pytest.fail()`
  --> PT015.py:23:5
   |
21 |     assert dict()
22 |     assert frozenset()
23 |     assert list([])
   |     ^^^^^^^^^^^^^^^
24 |     assert set(set())
25 |     assert tuple("")
   |

PT015 Assertion always fails, replace with `pytest.fail()`
  --> PT015.py:24:5
   |
22 |     assert frozenset()
23 |     assert list([])
24 |     assert set(set())
   |     ^^^^^^^^^^^^^^^^^
25 |     assert tuple("")
   |

PT015 Assertion always fails, replace with `pytest.fail()`
  --> PT015.py:25:5
   |
23 |     assert list([])
24 |     assert set(set())
25 |     assert tuple("")
   |     ^^^^^^^^^^^^^^^^
26 |
27 | # https://github.com/astral-sh/ruff/issues/19935
   |
