From 58f386135813ab6e55641bec6eae32cc0fd35115 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 2 Sep 2016 15:07:42 +1000 Subject: tests/unix/extra_coverage: Add test for str/bytes with invalid hash. --- tests/unix/extra_coverage.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/unix/extra_coverage.py') diff --git a/tests/unix/extra_coverage.py b/tests/unix/extra_coverage.py index 8f330f1da..72bcc9994 100644 --- a/tests/unix/extra_coverage.py +++ b/tests/unix/extra_coverage.py @@ -5,4 +5,11 @@ except NameError: import sys sys.exit() -extra_coverage() +data = extra_coverage() + +# test hashing of str/bytes that have an invalid hash +print(data) +print(hash(data[0])) +print(hash(data[1])) +print(hash(bytes(data[0], 'utf8'))) +print(hash(str(data[1], 'utf8'))) -- cgit v1.2.3