In some unit testing I'm currently doing, I need to pass a test when a variable lies between two boundary conditions.
Something like -
myInt = 5
You can use assertTrue() for that purpose:
self.assertTrue(myInt >= 3 and myInt <= 8)
Or, using Python's comparison chaining idiom:
self.assertTrue(3 <= myInt <= 8)