def test_take_a_screenshot_with_invalid_folder(self):
        from ImageHorizonLibrary import ScreenshotFolderException

        for index, invalid_folder in enumerate((None, 0, False), 1):
            self.lib.screenshot_folder = invalid_folder
            expected = path_join(getcwd(),
                                 'ImageHorizon-screenshot-%d.png' % index)
            self.lib.take_a_screenshot()
            self.mock.screenshot.assert_called_once_with(expected)
            self.mock.reset_mock()

        for invalid_folder in (123, object()):
            self.lib.screenshot_folder = invalid_folder
            with self.assertRaises(ScreenshotFolderException):
                self.lib.take_a_screenshot()
dataset/ETHPy150Open Eficode/robotframework-imagehorizonlibrary/tests/utest/test_screenshot.py/TestScreenshot.test_take_a_screenshot_with_invalid_folder/original