params = { 'empty_line': ('', {}), 'get_ok': ('GET 200', {'request': 'GET', 'status': '200'}), 'get_not_found': ('GET 404', {'request': 'GET', 'status': '404'}), } @pytest.mark.parametrize('line,expected', list(params.values()), ids=list(params.keys())) def test_decode(self, line, expected): assert decode(line) == expected
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter