コード例 #1
0
    def test__read_file__non_existing_file__return_empty(self):
        # Act
        result = FileInspector.read_file(os.path.join(self.sub1_path, 'no-file.txt'))

        # Assert
        self.assertEqual("", result)
コード例 #2
0
    def test__read_file__path_to_directory__return_empty(self):
        # Act
        result = FileInspector.read_file(os.path.join(self.sub1_path))

        # Assert
        self.assertEqual("", result)
コード例 #3
0
    def test__read_file__existing_file__read_all(self):
        # Act
        result = FileInspector.read_file(self.txt_path)

        # Assert
        self.assertEqual(self.txt_content, result)