diff --git a/tests/test_wordlist.py b/tests/test_wordlist.py index dc35bb6ac565e9287d5fa5a7c75c6786faa8beda..0e277c80e2cb6f6c742ecb635e8f29051fcadf90 100644 --- a/tests/test_wordlist.py +++ b/tests/test_wordlist.py @@ -179,14 +179,12 @@ class TestWordList(object): w_list = WordList(fd) assert w_list.fd is not fd - def test_open_file_descriptor_simple(self, tmpdir): - # we handle simple lists from open file descriptors correctly + def test_file_simple(self, tmpdir): + # we handle simple files correctly in_file = tmpdir.mkdir("work").join("mywordlist") in_file.write("foo\nbar\n\nbaz\n") - with open(str(in_file), "r") as my_open_file: - w_list = WordList(my_open_file) - result = tuple(w_list) - assert result == ("foo", "bar", "baz") + w_list = WordList(in_file.strpath) + assert tuple(w_list) == ("foo", "bar", "baz") def test_detect_unsigned_wordlists(self, tmpdir): # we can detect unsigned wordlist files.