Example #1
0
    def test_attribute(self):
        class TestClass:
            pass

        test_obj = TestClass()
        test_obj.att = 10
        verify(test_obj).attribute('att').equals(10)
Example #2
0
 def test_is_zero(self):
     verify(0).is_zero()
Example #3
0
 def test_length_equal_broken_not_int(self):
     with self.assertRaises(TestBrokenException):
         verify([1]).size.equal_to_length_of(2)
Example #4
0
 def test_length_equal_failed(self):
     with self.assertRaises(AssertionError):
         verify([]).size.equals(1)
Example #5
0
 def test_greater_than_broken(self):
     with self.assertRaises(TestBrokenException):
         verify(2).greater_than('1')
Example #6
0
 def test_is_a_ok(self):
     verify(1).same_as(1)
     verify('a').same_as('a')
     a_l = []
     verify(a_l).same_as(a_l)
Example #7
0
 def test_less_than_broken(self):
     with self.assertRaises(TestBrokenException):
         verify(2).less_than('1')
Example #8
0
 def test_less_than(self):
     verify(1).less_than(2)
Example #9
0
 def test_type_is_failed(self):
     with self.assertRaises(AssertionError):
         verify('text').type_is(list)
Example #10
0
 def test_type_is(self):
     verify([1, 2]).type_is(list)
     verify('text').type_is(str)
Example #11
0
 def test_attribute_failed(self):
     with self.assertRaises(AssertionError):
         verify('text').attribute('x').equals(10)
Example #12
0
 def test_is_negative(self):
     verify(-1).is_negative()
Example #13
0
 def test_is_positive_list(self):
     verify([1, 2]).is_positive()
Example #14
0
 def test_is_positive(self):
     verify(1).is_positive()
Example #15
0
 def test_not_equal(self):
     verify(1).not_equals(2)
Example #16
0
 def test_length_less_or_equal_eq(self):
     verify(1).less_or_equal_to(1)
Example #17
0
 def test_not_equal_failed(self):
     with self.assertRaises(AssertionError):
         verify(1).not_equals(1)
Example #18
0
 def test_length_less_or_equal_failed(self):
     with self.assertRaises(AssertionError):
         verify(1).less_or_equal_to(0)
Example #19
0
 def test_less_than_failed(self):
     with self.assertRaises(AssertionError):
         verify(2).less_than(1)
Example #20
0
 def test_length_greater_or_equal_eq(self):
     verify(1).greater_or_equal_to(1)
Example #21
0
 def test_greater_than(self):
     verify(1).greater_than(0)
Example #22
0
 def test_is_not_none(self):
     verify(1).is_not_none()
Example #23
0
 def test_greater_than_failed_if_equal(self):
     with self.assertRaises(AssertionError):
         verify(2).greater_than(2)
Example #24
0
 def test_length_greater_or_equal_failed(self):
     with self.assertRaises(AssertionError):
         verify(1).greater_or_equal_to(2)
Example #25
0
 def test_length_equal(self):
     verify([]).size.equals(0)
Example #26
0
 def test_is_not_none_failed(self):
     with self.assertRaises(AssertionError):
         verify(None).is_not_none()
Example #27
0
 def test_length_equal_broken(self):
     with self.assertRaises(TestBrokenException):
         verify(2).size.equals(2)
Example #28
0
 def test_equal(self):
     verify(1).equals(1)
Example #29
0
 def test_length_equal_to_length_of(self):
     verify([1]).size.equal_to_length_of([2])
Example #30
0
 def test_is_not_empty(self):
     verify([1, 2]).is_not_empty()