Closed lucemia closed 2 years ago
snapshottest==0.5.1
@pytest.mark.parametrize("text", ["'"]) def test_foo(text, snapshot): snapshot.assert_match(True)
generated snapshot test
# -*- coding: utf-8 -*- # snapshottest: v1 - https://goo.gl/zC4yUc from __future__ import unicode_literals from snapshottest import Snapshot snapshots = Snapshot() snapshots['test_foo['] 1'] = True
It will raise Syntax error
snapshots['test_foo['] 1'] = True ^ SyntaxError: invalid syntax
Thanks for the report! Would welcome a PR that will correctly encode test names for parameterized tests with quotes.
How to reproduce:
snapshottest==0.5.1
generated snapshot test
It will raise Syntax error