This is due to a change in argparse, where "optional arguments" was replaced by "options" but your tests still expect the old string.
Version info
trash-cli 0.21.10.24
python 3.10.3
Error log
=================================== FAILURES ===================================
_________________________ TestEmptyEndToEnd.test_help __________________________
self = <tests.empty.test_empty_end_to_end.TestEmptyEndToEnd testMethod=test_help>
def test_help(self):
result = run_command.run_command(self.tmp_dir, "trash-empty",
['--help'])
> self.assertEqual(["""\
usage: trash-empty [-h] [--version] [--trash-dir TRASH_DIR] [--all-users] [-i]
[-f]
[days]
Purge trashed files.
positional arguments:
days
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
--trash-dir TRASH_DIR
specify the trash directory to use
--all-users empty all trashcan of all the users
-i, --interactive ask before emptying trash directories
-f don't ask before emptying trash directories
Report bugs to https://github.com/andreafrancia/trash-cli/issues
""", '', 0],
[result.stdout,
result.stderr,
result.exit_code])
E AssertionError: Lists differ: ["usa[189 chars]ptional arguments:\n -h, --help sh[445 chars]', 0] != ["usa[189 chars]ptions:\n -h, --help show this hel[434 chars]', 0]
E
E First differing element 0:
E "usag[188 chars]ptional arguments:\n -h, --help sh[437 chars]es\n"
E "usag[188 chars]ptions:\n -h, --help show this hel[426 chars]es\n"
E
E Diff is 829 characters long. Set self.maxDiff to None to see it.
tests/empty/test_empty_end_to_end.py:18: AssertionError
__________________________ TestEndToEndList.test_help __________________________
self = <tests.list.test_end_to_end_list.TestEndToEndList testMethod=test_help>
def test_help(self):
result = run_command.run_command(self.tmp_dir, "trash-list", ['--help'])
> self.assertEqual("""\
usage: trash-list [-h] [--version] [--trash-dir TRASH_DIRS]
List trashed files
optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
--trash-dir TRASH_DIRS
specify the trash directory to use
Report bugs to https://github.com/andreafrancia/trash-cli/issues
""", result.stdout)
E AssertionError: "usag[82 chars]ptional arguments:\n -h, --help sh[245 chars]es\n" != "usag[82 chars]ptions:\n -h, --help show this hel[234 chars]es\n"
E usage: trash-list [-h] [--version] [--trash-dir TRASH_DIRS]
E
E List trashed files
E
E - optional arguments:
E + options:
E -h, --help show this help message and exit
E --version show program's version number and exit
E --trash-dir TRASH_DIRS
E specify the trash directory to use
E
E Report bugs to https://github.com/andreafrancia/trash-cli/issues
tests/list/test_end_to_end_list.py:46: AssertionError
=========================== short test summary info ============================
FAILED tests/empty/test_empty_end_to_end.py::TestEmptyEndToEnd::test_help - A...
FAILED tests/list/test_end_to_end_list.py::TestEndToEndList::test_help - Asse...
======================== 2 failed, 283 passed in 2.98s =========================
This is due to a change in argparse, where "optional arguments" was replaced by "options" but your tests still expect the old string.
Version info trash-cli 0.21.10.24 python 3.10.3
Error log