Beispiel #1
0
 def test_fixtures(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'])
 def test_fixtures(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'])
Beispiel #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)
Beispiel #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))
Beispiel #5
0
 def test_value_with_empty_fixture(self):
     assert_equals(FixtureController(self.parent, Fixture('Teardown')).display_value, '')
 def test_teardown_from_test(self):
     teardown = Fixture('Teardown')
     teardown.populate(['name', 'arg', 'arg2'])
     assert_equal(self.tcf_defaults.get_teardown(teardown).name, 'name')
 def test_teardown_empty(self):
     assert_equal(
         self.tcf_defaults.get_teardown(Fixture('Suite Setup')).name, '')
 def test_setup_from_directory(self):
     setup = self.tcf_defaults.get_setup(Fixture('Suite Setup'))
     assert_equal(setup.name, 'dir_setup')
     assert_equal(setup.args, ['arg'])
 def test_teardown_from_test(self):
     teardown = Fixture("Teardown")
     teardown.populate(["name", "arg", "arg2"])
     assert_equal(self.tcf_defaults.get_teardown(teardown).name, "name")