def test_scalar_in_excluded(self): asserts.assert_scalar_in(0.5, 0, 1, included=False) with self.assertRaisesRegex(AssertionError, 'argument must be in'): asserts.assert_scalar_in(0, 0, 1, included=False) with self.assertRaisesRegex(AssertionError, 'argument must be in'): asserts.assert_scalar_in(1, 0, 1, included=False)
def test_scalar_in(self): asserts.assert_scalar_in(0.5, 0, 1) with self.assertRaisesRegex(AssertionError, 'argument must be in'): asserts.assert_scalar_in(-0.5, 0, 1) with self.assertRaisesRegex(AssertionError, 'argument must be in'): asserts.assert_scalar_in(1.5, 0, 1)