From f520a7eb08d0f150245c86e6c8e5d2645b6f6ba1 Mon Sep 17 00:00:00 2001
From: ulif <uli@gnufix.de>
Date: Mon, 3 Aug 2015 00:36:05 +0200
Subject: [PATCH] Fix test: make it run also in Python 2.7.

We have to try hard to create a string accepted by all supported
Python versions.
---
 tests/test_wordlist.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/test_wordlist.py b/tests/test_wordlist.py
index 3be9e66..8e9ea35 100644
--- a/tests/test_wordlist.py
+++ b/tests/test_wordlist.py
@@ -148,7 +148,7 @@ class TestWordList(object):
 
     def test_create_accepts_fd_with_broken_seek(self, argv_handler):
         # we accept files that have no working seek() (like sys.stdin)
-        fd = StringIO("word1\nword2\n")
+        fd = StringIO(b"word1\nword2\n".decode("utf-8"))
         def broken_seek(num):
             raise IOError("Illegal seek")
         fd.seek = broken_seek
-- 
GitLab