コード例 #1
0
ファイル: test_steps.py プロジェクト: manojpkr/allure-python
def step_with(name, start, stop, status):
    return has_properties(name=name,
                          title=name,
                          attrib=all_of(
                                        has_entry('start', has_float(greater_than_or_equal_to(start))),
                                        has_entry('stop', has_float(less_than_or_equal_to(stop))),
                                        has_entry('status', status)))
コード例 #2
0
ファイル: test_steps.py プロジェクト: dchr/allure-python
def step_with(name, start, stop, status):
    return has_properties(
        name=name,
        attrib=all_of(
            has_entry('start', has_float(greater_than_or_equal_to(start))),
            has_entry('stop', has_float(less_than_or_equal_to(stop))),
            has_entry('status', status)))
コード例 #3
0
 def testDescribeMismatch(self):
     self.assert_describe_mismatch("was <0>", greater_than(1), 0)
     self.assert_describe_mismatch("was <2>", less_than(1), 2)
     self.assert_describe_mismatch("was <0>", greater_than_or_equal_to(1), 0)
     self.assert_describe_mismatch("was <2>", less_than_or_equal_to(1), 2)
コード例 #4
0
 def testMismatchDescription(self):
     self.assert_mismatch_description("was <0>", greater_than(1), 0)
     self.assert_mismatch_description("was <2>", less_than(1), 2)
     self.assert_mismatch_description("was <0>", greater_than_or_equal_to(1), 0)
     self.assert_mismatch_description("was <2>", less_than_or_equal_to(1), 2)
コード例 #5
0
 def testSuccessfulMatchDoesNotGenerateMismatchDescription(self):
     self.assert_no_mismatch_description(greater_than(1), 2)
     self.assert_no_mismatch_description(less_than(1), 0)
     self.assert_no_mismatch_description(greater_than_or_equal_to(1), 1)
     self.assert_no_mismatch_description(less_than_or_equal_to(1), 1)
コード例 #6
0
 def testHasAReadableDescription(self):
     self.assert_description("a value greater than <1>", greater_than(1))
     self.assert_description("a value greater than or equal to <1>", greater_than_or_equal_to(1))
     self.assert_description("a value less than <1>", less_than(1))
     self.assert_description("a value less than or equal to <1>", less_than_or_equal_to(1))
コード例 #7
0
 def testComparesObjectsForLessThanOrEqualTo(self):
     self.assert_matches("match", less_than_or_equal_to(1), 0)
     self.assert_matches("match", less_than_or_equal_to(1), 1)
     self.assert_does_not_match("no match", less_than_or_equal_to(1), 2)
コード例 #8
0
ファイル: unit.py プロジェクト: rubenbp/roboexplorer
 def test_return_next_cell_in_valid_range(self):
     for x in range(999):
         assert_that(
             self.next_cell_calculator.next(), all_of(greater_than_or_equal_to(0), less_than_or_equal_to(100))
         )