Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_non_working_reporter_does_not_report(self):
self.assertFileDoesNotExist(self.approved_file_path)
reporter = GenericDiffReporter(('Custom', 'NotReal'))
success = reporter.report(self.received_file_path, self.approved_file_path)
self.assertFalse(success)
def test_pycharm_diff_command():
reporter = GenericDiffReporter(["PyCharm", '/Applications/PyCharm CE.app/Contents/MacOS/pycharm', ["diff"]])
received_path = "received.txt"
approved_path = "approved.txt"
verify(str(reporter.get_command(received_path, approved_path)))
def _create_reporter(config):
if not config:
return None
return GenericDiffReporter(config)
def test_notworking_in_environment(self):
reporter = GenericDiffReporter(('Custom', 'NotReal'))
self.assertFalse(reporter.is_working())
def create(diff_tool_path):
return GenericDiffReporter(['custom', diff_tool_path])