Пример #1
0
    def test_CreateXMLOutputFilename_ValidPathToFileAndOutputDir_XMLPathCreated(
            self, mock_abspath):
        test_path_to_file = os.path.join('path', 'to', 'module.dll')
        test_output_dir = os.path.join('TestResults', 'Timestamp')

        scanner.create_xml_output_filename(test_path_to_file, test_output_dir)

        expected_path = os.path.join(test_output_dir,
                                     "test_results_module.xml")
        mock_abspath.assert_called_with(expected_path)
Пример #2
0
 def test_CreateXMLOutputFilename_OutputDirIsNone_ThrowsTypeError(self):
     with self.assertRaises(TypeError) as ex:
         scanner.create_xml_output_filename("PathToFile", None)
Пример #3
0
 def test_CreateXMLOutputFilename_PathToFileIsNone_ThrowsInvalidUseError(
         self):
     with self.assertRaises(InvalidUseError) as ex:
         scanner.create_xml_output_filename(None, "OutputDir")