sphinx-contrib / autoprogram

Documenting CLI programs
https://pypi.org/project/sphinxcontrib-autoprogram/
Other
44 stars 23 forks source link

Test case failures in Python 3.10 #24

Closed tirkarthi closed 1 year ago

tirkarthi commented 3 years ago

Due to changes in https://github.com/python/cpython/pull/23858 "optional arguments" has become "options" in Python 3.10 causing test case failures.

python setup.py test
running test
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
running egg_info
writing sphinxcontrib_autoprogram.egg-info/PKG-INFO
writing dependency_links to sphinxcontrib_autoprogram.egg-info/dependency_links.txt
writing namespace_packages to sphinxcontrib_autoprogram.egg-info/namespace_packages.txt
writing requirements to sphinxcontrib_autoprogram.egg-info/requires.txt
writing top-level names to sphinxcontrib_autoprogram.egg-info/top_level.txt
reading manifest file 'sphinxcontrib_autoprogram.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'README'
warning: no files found matching 'CHANGES.*'
writing manifest file 'sphinxcontrib_autoprogram.egg-info/SOURCES.txt'
running build_ext
test_argument_groups (sphinxcontrib.autoprogram.ScannerTestCase) ... FAIL
test_choices (sphinxcontrib.autoprogram.ScannerTestCase) ... ok
test_parse_epilog (sphinxcontrib.autoprogram.ScannerTestCase) ... ok
test_simple_parser (sphinxcontrib.autoprogram.ScannerTestCase) ... ok
test_subcommands (sphinxcontrib.autoprogram.ScannerTestCase) ... ok
test_make_rst (sphinxcontrib.autoprogram.AutoprogramDirectiveTestCase)
Alt least it shouldn't raise errors during making RST string. ... ok
test_import_object (sphinxcontrib.autoprogram.UtilTestCase) ... ok

======================================================================
FAIL: test_argument_groups (sphinxcontrib.autoprogram.ScannerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/checked_repos/autoprogram/sphinxcontrib/autoprogram.py", line 427, in test_argument_groups
    self.assertEqual('optional arguments', group.title)
AssertionError: 'optional arguments' != 'options'
- optional arguments
+ options

----------------------------------------------------------------------
Ran 7 tests in 0.012s

FAILED (failures=1)
Test failed: <unittest.runner.TextTestResult run=7 errors=0 failures=1>
error: Test failed: <unittest.runner.TextTestResult run=7 errors=0 failures=1>