How to use the approvaltests.reporters.generic_diff_reporter.GenericDiffReporter function in approvaltests

To help you get started, we’ve selected a few approvaltests examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github approvals / ApprovalTests.Python / tests / reporters / test_genericdiffreporter.py View on Github external
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)
github approvals / ApprovalTests.Python / tests / reporters / test_pycharm_reporter.py View on Github external
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)))
github approvals / ApprovalTests.Python / approvaltests / reporters / generic_diff_reporter_factory.py View on Github external
def _create_reporter(config):
        if not config:
            return None
        return GenericDiffReporter(config)
github approvals / ApprovalTests.Python / tests / reporters / test_genericdiffreporter.py View on Github external
def test_notworking_in_environment(self):
        reporter = GenericDiffReporter(('Custom', 'NotReal'))
        self.assertFalse(reporter.is_working())
github approvals / ApprovalTests.Python / approvaltests / reporters / generic_diff_reporter.py View on Github external
def create(diff_tool_path):
        return GenericDiffReporter(['custom', diff_tool_path])