.. _redundant-unittest-assert: redundant-unittest-assert / W1503 ================================= **Message emitted:** Redundant use of %s with constant value %r **Description:** *The first argument of assertTrue and assertFalse is a condition. If a constant is passed as parameter, that condition will be always true. In this case a warning should be emitted.* **Correct code:** .. code-block:: python import unittest class DummyTestCase(unittest.TestCase): def test_dummy(self): # Nothing, as an assert of a string literal will always pass **Problematic code:** .. code-block:: python import unittest class DummyTestCase(unittest.TestCase): def test_dummy(self): self.assertTrue("foo") # [redundant-unittest-assert] Created by ``stdlib`` checker