Closed ahesford closed 5 months ago
This seems to be making tests fail on python-3.12:
`============================= test session starts ============================== platform linux -- Python 3.12.2, pytest-8.1.1, pluggy-1.4.0 -- /var/tmp/portage/app-admin/xkcdpass-1.19.8/work/xkcdpass-1.19.8-python3_12/install/usr/bin/python3.12 cachedir: .pytest_cache rootdir: /var/tmp/portage/app-admin/xkcdpass-1.19.8/work/xkcdpass-1.19.8 collecting ... collected 9 items
tests/test_xkcdpass.py::XkcdPasswordTests::test_acrostic PASSED [1/9] tests/test_xkcdpass.py::XkcdPasswordTests::test_delim PASSED [2/9] tests/test_xkcdpass.py::XkcdPasswordTests::test_loadwordfile PASSED [3/9] tests/test_xkcdpass.py::XkcdPasswordTests::test_random_delimiter FAILED [4/9] tests/test_xkcdpass.py::XkcdPasswordTests::test_regex PASSED [5/9] tests/test_xkcdpass.py::XkcdPasswordTests::test_set_case PASSED [6/9] tests/test_xkcdpass.py::TestEmitPasswords::test_emits_no_separator_when_specified_separator_empty PASSED [7/9] tests/test_xkcdpass.py::TestEmitPasswords::test_emits_specified_count_of_passwords PASSED [8/9] tests/test_xkcdpass.py::TestEmitPasswords::test_emits_specified_separator_between_passwords PASSED [9/9]
=================================== FAILURES =================================== ___ XkcdPasswordTests.test_random_delimiter ____
self =
def test_random_delimiter(self):
wordlength = 4
numwords = 3
wordlist = xkcd_password.generate_wordlist(
WORDFILE, min_length=wordlength, max_length=wordlength
)
result = xkcd_password.generate_xkcdpassword(
wordlist, numwords=numwords, random_delimiters=True
)
# check that the result is the right length
self.assertEquals(len(result), numwords * wordlength + (numwords - 1))
E AttributeError: 'XkcdPasswordTests' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?
numwords = 3
result = 'cork#dint2rage'
self =
This is fixed in the latest version 1.19.9, thank you both for flagging!
The
self.assertEquals
call intest_random_delimiter
should beself.assertEqual
(no trailings
).