How to use the approvaltests.approvals.verify_all 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 / test_list.py View on Github external
def test(self):
        alist = ['a', 'b', 'c', 'd', 'e']
        approvals.verify_all('letters', alist, reporter=DiffReporter())
github approvals / ApprovalTests.Python / tests / test_list.py View on Github external
def test_format_line_part2(self):
        # This is a part two of a test that would reproduce a bug where
        # `verify_all` does not reset index when called from two different tests.
        # More details in issue #32
        alist = ['1', '2', '3']
        approvals.verify_all('index', alist, reporter=DiffReporter())
github approvals / ApprovalTests.Python / tests / test_list.py View on Github external
def test_format_line_part1(self):
        # This is part one of a test which reproduces the issue #32
        alist = ['1', '2', '3']
        approvals.verify_all('index', alist, reporter=DiffReporter())
github approvals / ApprovalTests.Python / tests / test_list.py View on Github external
def test_uppercase(self):
        alist = ['a', 'b', 'c', 'd']
        approvals.verify_all('uppercase', alist, lambda x: '{0} => {1}'.format(x, x.upper()))