Exemple #1
0
 def get_collector(
         cls,
         instructionsfile: str,
         examiner: str = '',
         placeholderfile: str = Placeholder.get_globalplaceholderfile(),
         protocollogfile: str = ''):
     Placeholder.set_globalplaceholderfile(placeholderfile)
     cls._logger.debug(f"Protocol log file: '{protocollogfile}'")
     protocol = LogFileProtocol(examiner,
                                own_protocol_filename=protocollogfile)
     xmlparser = XmlParser(instructionsfile, protocol)
     collector = cls(parser=xmlparser, protocol=protocol)
     return collector
Exemple #2
0
    def test_get_globalplaceholerfile(self):
        """Return the default placeholder file, if no placeholder file has been provided."""
        actual_placeholder_file = Placeholder.get_globalplaceholderfile()

        self.assertEqual(actual_placeholder_file, Placeholder.GLOBAL_PLACEHOLDER_FILE_PATH)