Assert an integer is within range August 27, 2023 by Tarik You can use a “chained comparison”: self.assertTrue(998 <= my_integer <= 1000)