Пример #1
0
 def test_fixture_patch(self):
     fixture = Fixture('Teardown')
     assert_equal(fixture.as_list(), ['Teardown'])
     fixture.name = 'Keyword'
     assert_equal(fixture.as_list(), ['Teardown', 'Keyword'])
     fixture.args = ['arg1', 'arg2']
     assert_equal(fixture.as_list(), ['Teardown', 'Keyword', 'arg1', 'arg2'])
     fixture.name = ''
     assert_equal(fixture.as_list(), ['Teardown', '', 'arg1', 'arg2'])
Пример #2
0
 def test_fixture_patch(self):
     fixture = Fixture("Teardown")
     assert_equals(fixture.as_list(), ["Teardown"])
     fixture.name = "Keyword"
     assert_equals(fixture.as_list(), ["Teardown", "Keyword"])
     fixture.args = ["arg1", "arg2"]
     assert_equals(fixture.as_list(), ["Teardown", "Keyword", "arg1", "arg2"])
     fixture.name = ""
     assert_equals(fixture.as_list(), ["Teardown", "", "arg1", "arg2"])
Пример #3
0
 def setUp(self):
     self.fix = Fixture('Suite Setup')
     self.fix.name = 'My Setup'
     self.fix.args = ['argh', 'urgh']
     self.parent = _FakeParent()
     self.ctrl = FixtureController(self.parent, self.fix)
Пример #4
0
 def test_contains_keyword_with_regexp_with_empty_fixture(self):
     empty_fixture_controller = FixtureController(self.parent, Fixture('Setup'))
     keyword_regexp = re.compile(r'foo.*bar')
     assert_false(empty_fixture_controller.contains_keyword(keyword_regexp))
Пример #5
0
 def test_value_with_empty_fixture(self):
     assert_equals(FixtureController(self.parent, Fixture('Teardown')).display_value, '')