title: Assert an integer is within range
body: <p>I am writing some unittests in python that are testing if I receive an integer. However sometimes this integer can be off by 1 or 2 and I don't really care. Essentially I want to be able to assert that the received integer is within a certain range, something like:</p>
  
  <pre><code>self.assertBetween(998, 1000, my_integer)
  </code></pre>
  
  <p>Is there an accepted way of doing this? Or will I have to do something like this:</p>
  
  <pre><code>self.assertTrue(998 &lt;= my_integer)
  self.assertTrue(my_integer &lt;= 1000)
  </code></pre>
  
  <p><strong>EDIT</strong>
  The answers so far suggest:</p>
  
  <pre><code>self.assertTrue(998 &lt;= my_integer &lt;= 1000)
  </code></pre>
  
  <p>Is there any benefit of this over my example with 2 asserts?</p>