def test_pass_listener_as_list(self):
     module_file = join(ROOT, 'utest', 'resources', 'Listener.py')
     assert_equal(
         run_without_outputs(self.data,
                             listener=[module_file + ":1",
                                       Listener(2)]), 1)
     self._assert_outputs([("[from listener 1]", 1),
                           ("[from listener 2]", 1)])
 def test_listeners(self):
     module_file = join(ROOTDIR, 'utest', 'resources', 'Listener.py')
     suite = build('setups_and_teardowns.robot')
     suite.run(output=None,
               log=None,
               report=None,
               listener=[module_file + ":1",
                         Listener(2)])
     self._assert_outputs([("[from listener 1]", 1),
                           ("[from listener 2]", 1)])
 def test_pass_listener_as_instance(self):
     assert_equal(run_without_outputs(self.data, listener=Listener(1)), 1)
     self._assert_outputs([("[from listener 1]", 1)])