mgeier / sphinx-last-updated-by-git

:watch: Get the "last updated" time for each Sphinx page from Git
BSD 2-Clause "Simplified" License
44 stars 9 forks source link

0.3.4: pytest is failing #52

Closed kloczek closed 7 months ago

kloczek commented 1 year ago

I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

I'm gueassing that at least some units are fsailing because I'm usimg as input resourcee autogenerated tar ball from git tag so source tree does not have .git/ directory with git metadata. Should I try to initialize tit repo as work around?

Here is pytest output:

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-last-updated-by-git-0.3.4-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-last-updated-by-git-0.3.4-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra -m 'not network' ==================================================================================== test session starts ==================================================================================== platform linux -- Python 3.8.16, pytest-7.2.2, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4, configfile: pytest.ini plugins: cov-4.0.0 collected 19 items tests/test_example_repo.py FFFFFFFFFFFFFFF [ 78%] tests/test_singlehtml.py F [ 84%] tests/test_untracked.py FFF [100%]/usr/lib64/python3.8/site-packages/coverage/inorout.py:507: CoverageWarning: Module sphinx_last_updated_by_git was never imported. (module-not-imported) self.warn(f"Module {pkg} was never imported.", slug="module-not-imported") /usr/lib64/python3.8/site-packages/coverage/control.py:858: CoverageWarning: No data was collected. (no-data-collected) self._warn("No data was collected.", slug="no-data-collected") WARNING: Failed to generate report: No data to report. /usr/lib/python3.8/site-packages/pytest_cov/plugin.py:297: CovReportWarning: Failed to generate report: No data to report. self.cov_controller.finish() ========================================================================================= FAILURES ========================================================================================== ______________________________________________________________________________________ test_repo_full _______________________________________________________________________________________ def test_repo_full(): > data = run_sphinx('repo_full') tests/test_example_repo.py:47: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ subdir = 'repo_full', kwargs = {}, srcdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full'), outdir = '/tmp/tmpw5hhx3z4' args = ['/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full', '/tmp/tmpw5hhx3z4', '-W', '-v'], result = 2, @py_assert2 = 0, @py_assert1 = False @py_format4 = '2 == 0' def run_sphinx(subdir, **kwargs): srcdir = Path(__file__).parent / subdir with tempfile.TemporaryDirectory() as outdir: args = [str(srcdir), outdir, '-W', '-v'] args.extend('-D{}={}'.format(k, v) for k, v in kwargs.items()) result = build_main(args) > assert result == 0 E assert 2 == 0 tests/test_example_repo.py:38: AssertionError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ Running Sphinx v6.1.3 ----------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------ Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in build_main app = Sphinx(args.sourcedir, args.confdir, args.outputdir, File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 202, in __init__ self.config = Config.read(self.confdir, confoverrides or {}, self.tags) File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 171, in read raise ConfigError(__("config directory doesn't contain a conf.py file (%s)") % sphinx.errors.ConfigError: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) Configuration error: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) ______________________________________________________________________________ test_untracked_no_dependencies _______________________________________________________________________________ def test_untracked_no_dependencies(): > data = run_sphinx( 'repo_full', git_untracked_check_dependencies=0, ) tests/test_example_repo.py:52: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ subdir = 'repo_full', kwargs = {'git_untracked_check_dependencies': 0}, srcdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full') outdir = '/tmp/tmpziev_e0t' args = ['/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full', '/tmp/tmpziev_e0t', '-W', '-v', '-Dgit_untracked_check_dependencies=0'], result = 2 @py_assert2 = 0, @py_assert1 = False, @py_format4 = '2 == 0' def run_sphinx(subdir, **kwargs): srcdir = Path(__file__).parent / subdir with tempfile.TemporaryDirectory() as outdir: args = [str(srcdir), outdir, '-W', '-v'] args.extend('-D{}={}'.format(k, v) for k, v in kwargs.items()) result = build_main(args) > assert result == 0 E assert 2 == 0 tests/test_example_repo.py:38: AssertionError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ Running Sphinx v6.1.3 ----------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------ Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in build_main app = Sphinx(args.sourcedir, args.confdir, args.outputdir, File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 202, in __init__ self.config = Config.read(self.confdir, confoverrides or {}, self.tags) File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 171, in read raise ConfigError(__("config directory doesn't contain a conf.py file (%s)") % sphinx.errors.ConfigError: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) Configuration error: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) ______________________________________________________________________________ test_untracked_show_sourcelink _______________________________________________________________________________ def test_untracked_show_sourcelink(): > data = run_sphinx( 'repo_full', git_untracked_show_sourcelink=1, ) tests/test_example_repo.py:63: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ subdir = 'repo_full', kwargs = {'git_untracked_show_sourcelink': 1}, srcdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full') outdir = '/tmp/tmp7zmv3wrw', args = ['/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full', '/tmp/tmp7zmv3wrw', '-W', '-v', '-Dgit_untracked_show_sourcelink=1'] result = 2, @py_assert2 = 0, @py_assert1 = False, @py_format4 = '2 == 0' def run_sphinx(subdir, **kwargs): srcdir = Path(__file__).parent / subdir with tempfile.TemporaryDirectory() as outdir: args = [str(srcdir), outdir, '-W', '-v'] args.extend('-D{}={}'.format(k, v) for k, v in kwargs.items()) result = build_main(args) > assert result == 0 E assert 2 == 0 tests/test_example_repo.py:38: AssertionError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ Running Sphinx v6.1.3 ----------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------ Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in build_main app = Sphinx(args.sourcedir, args.confdir, args.outputdir, File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 202, in __init__ self.config = Config.read(self.confdir, confoverrides or {}, self.tags) File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 171, in read raise ConfigError(__("config directory doesn't contain a conf.py file (%s)") % sphinx.errors.ConfigError: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) Configuration error: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) ____________________________________________________________________ test_untracked_no_dependencies_and_show_sourcelink _____________________________________________________________________ def test_untracked_no_dependencies_and_show_sourcelink(): > data = run_sphinx( 'repo_full', git_untracked_check_dependencies=0, git_untracked_show_sourcelink=1, ) tests/test_example_repo.py:74: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ subdir = 'repo_full', kwargs = {'git_untracked_check_dependencies': 0, 'git_untracked_show_sourcelink': 1} srcdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full'), outdir = '/tmp/tmpeaci9giv' args = ['/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full', '/tmp/tmpeaci9giv', '-W', '-v', '-Dgit_untracked_check_dependencies=0', '-Dgit_untracked_show_sourcelink=1'] result = 2, @py_assert2 = 0, @py_assert1 = False, @py_format4 = '2 == 0' def run_sphinx(subdir, **kwargs): srcdir = Path(__file__).parent / subdir with tempfile.TemporaryDirectory() as outdir: args = [str(srcdir), outdir, '-W', '-v'] args.extend('-D{}={}'.format(k, v) for k, v in kwargs.items()) result = build_main(args) > assert result == 0 E assert 2 == 0 tests/test_example_repo.py:38: AssertionError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ Running Sphinx v6.1.3 ----------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------ Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in build_main app = Sphinx(args.sourcedir, args.confdir, args.outputdir, File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 202, in __init__ self.config = Config.read(self.confdir, confoverrides or {}, self.tags) File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 171, in read raise ConfigError(__("config directory doesn't contain a conf.py file (%s)") % sphinx.errors.ConfigError: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) Configuration error: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) _____________________________________________________________________________________ test_repo_shallow _____________________________________________________________________________________ capsys = <_pytest.capture.CaptureFixture object at 0x7f05d99b5fa0> def test_repo_shallow(capsys): with pytest.raises(AssertionError): run_sphinx('repo_shallow') > assert 'too shallow' in capsys.readouterr().err E assert 'too shallow' in '\nTraceback (most recent call last):\n File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in bui... doesn\'t contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_shallow)\n' E + where '\nTraceback (most recent call last):\n File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in bui... doesn\'t contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_shallow)\n' = CaptureResult(out='Running Sphinx v6.1.3\n', err='\nTraceback (most recent call last):\n File "/usr/lib/python3.8/sit...doesn\'t contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_shallow)\n').err E + where CaptureResult(out='Running Sphinx v6.1.3\n', err='\nTraceback (most recent call last):\n File "/usr/lib/python3.8/sit...doesn\'t contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_shallow)\n') = >() E + where > = <_pytest.capture.CaptureFixture object at 0x7f05d99b5fa0>.readouterr tests/test_example_repo.py:88: AssertionError _____________________________________________________________________________ test_repo_shallow_without_warning _____________________________________________________________________________ def test_repo_shallow_without_warning(): > data = run_sphinx( 'repo_shallow', suppress_warnings='git.too_shallow,', ) tests/test_example_repo.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ subdir = 'repo_shallow', kwargs = {'suppress_warnings': 'git.too_shallow,'}, srcdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_shallow') outdir = '/tmp/tmpjkbfcflz' args = ['/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_shallow', '/tmp/tmpjkbfcflz', '-W', '-v', '-Dsuppress_warnings=git.too_shallow,'], result = 2 @py_assert2 = 0, @py_assert1 = False, @py_format4 = '2 == 0' def run_sphinx(subdir, **kwargs): srcdir = Path(__file__).parent / subdir with tempfile.TemporaryDirectory() as outdir: args = [str(srcdir), outdir, '-W', '-v'] args.extend('-D{}={}'.format(k, v) for k, v in kwargs.items()) result = build_main(args) > assert result == 0 E assert 2 == 0 tests/test_example_repo.py:38: AssertionError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ Running Sphinx v6.1.3 ----------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------ Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in build_main app = Sphinx(args.sourcedir, args.confdir, args.outputdir, File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 202, in __init__ self.config = Config.read(self.confdir, confoverrides or {}, self.tags) File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 171, in read raise ConfigError(__("config directory doesn't contain a conf.py file (%s)") % sphinx.errors.ConfigError: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_shallow) Configuration error: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_shallow) ___________________________________________________________________________________ test_custom_timezone ____________________________________________________________________________________ def test_custom_timezone(): > data = run_sphinx( 'repo_full', git_last_updated_timezone='Africa/Ouagadougou', ) tests/test_example_repo.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ subdir = 'repo_full', kwargs = {'git_last_updated_timezone': 'Africa/Ouagadougou'}, srcdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full') outdir = '/tmp/tmpoz8w63za' args = ['/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full', '/tmp/tmpoz8w63za', '-W', '-v', '-Dgit_last_updated_timezone=Africa/Ouagadougou'], result = 2 @py_assert2 = 0, @py_assert1 = False, @py_format4 = '2 == 0' def run_sphinx(subdir, **kwargs): srcdir = Path(__file__).parent / subdir with tempfile.TemporaryDirectory() as outdir: args = [str(srcdir), outdir, '-W', '-v'] args.extend('-D{}={}'.format(k, v) for k, v in kwargs.items()) result = build_main(args) > assert result == 0 E assert 2 == 0 tests/test_example_repo.py:38: AssertionError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ Running Sphinx v6.1.3 ----------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------ Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in build_main app = Sphinx(args.sourcedir, args.confdir, args.outputdir, File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 202, in __init__ self.config = Config.read(self.confdir, confoverrides or {}, self.tags) File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 171, in read raise ConfigError(__("config directory doesn't contain a conf.py file (%s)") % sphinx.errors.ConfigError: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) Configuration error: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) ________________________________________________________________________________________ test_no_git ________________________________________________________________________________________ capsys = <_pytest.capture.CaptureFixture object at 0x7f05d9949e50> def test_no_git(capsys): path_backup = os.environ['PATH'] os.environ['PATH'] = '' try: with pytest.raises(AssertionError): run_sphinx('repo_full') > assert '"git" command not found' in capsys.readouterr().err E assert '"git" command not found' in '\nTraceback (most recent call last):\n File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in bui...ory doesn\'t contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full)\n' E + where '\nTraceback (most recent call last):\n File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in bui...ory doesn\'t contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full)\n' = CaptureResult(out='Running Sphinx v6.1.3\n', err='\nTraceback (most recent call last):\n File "/usr/lib/python3.8/sit...ry doesn\'t contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full)\n').err E + where CaptureResult(out='Running Sphinx v6.1.3\n', err='\nTraceback (most recent call last):\n File "/usr/lib/python3.8/sit...ry doesn\'t contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full)\n') = >() E + where > = <_pytest.capture.CaptureFixture object at 0x7f05d9949e50>.readouterr tests/test_example_repo.py:116: AssertionError __________________________________________________________________________________ test_no_git_no_warning ___________________________________________________________________________________ capsys = <_pytest.capture.CaptureFixture object at 0x7f05d98e20d0> def test_no_git_no_warning(capsys): path_backup = os.environ['PATH'] os.environ['PATH'] = '' try: > data = run_sphinx( 'repo_full', suppress_warnings='git.command_not_found') tests/test_example_repo.py:125: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ subdir = 'repo_full', kwargs = {'suppress_warnings': 'git.command_not_found'}, srcdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full') outdir = '/tmp/tmpdh8c_m0_' args = ['/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full', '/tmp/tmpdh8c_m0_', '-W', '-v', '-Dsuppress_warnings=git.command_not_found'], result = 2 @py_assert2 = 0, @py_assert1 = False, @py_format4 = '2 == 0' def run_sphinx(subdir, **kwargs): srcdir = Path(__file__).parent / subdir with tempfile.TemporaryDirectory() as outdir: args = [str(srcdir), outdir, '-W', '-v'] args.extend('-D{}={}'.format(k, v) for k, v in kwargs.items()) result = build_main(args) > assert result == 0 E assert 2 == 0 tests/test_example_repo.py:38: AssertionError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ Running Sphinx v6.1.3 ----------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------ Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in build_main app = Sphinx(args.sourcedir, args.confdir, args.outputdir, File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 202, in __init__ self.config = Config.read(self.confdir, confoverrides or {}, self.tags) File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 171, in read raise ConfigError(__("config directory doesn't contain a conf.py file (%s)") % sphinx.errors.ConfigError: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) Configuration error: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) ___________________________________________________________________________ test_exclude_patterns_srcdir_relative ___________________________________________________________________________ def test_exclude_patterns_srcdir_relative(): > data = run_sphinx( 'repo_full', git_exclude_patterns='I 🖤 Unicode.rst', ) tests/test_example_repo.py:135: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ subdir = 'repo_full', kwargs = {'git_exclude_patterns': 'I 🖤 Unicode.rst'}, srcdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full') outdir = '/tmp/tmpl3d4ibcj' args = ['/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full', '/tmp/tmpl3d4ibcj', '-W', '-v', '-Dgit_exclude_patterns=I 🖤 Unicode.rst'], result = 2 @py_assert2 = 0, @py_assert1 = False, @py_format4 = '2 == 0' def run_sphinx(subdir, **kwargs): srcdir = Path(__file__).parent / subdir with tempfile.TemporaryDirectory() as outdir: args = [str(srcdir), outdir, '-W', '-v'] args.extend('-D{}={}'.format(k, v) for k, v in kwargs.items()) result = build_main(args) > assert result == 0 E assert 2 == 0 tests/test_example_repo.py:38: AssertionError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ Running Sphinx v6.1.3 ----------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------ Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in build_main app = Sphinx(args.sourcedir, args.confdir, args.outputdir, File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 202, in __init__ self.config = Config.read(self.confdir, confoverrides or {}, self.tags) File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 171, in read raise ConfigError(__("config directory doesn't contain a conf.py file (%s)") % sphinx.errors.ConfigError: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) Configuration error: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) ________________________________________________________________________________ test_exclude_patterns_glob _________________________________________________________________________________ def test_exclude_patterns_glob(): > data = run_sphinx( 'repo_full', git_exclude_patterns='*.rst', ) tests/test_example_repo.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ subdir = 'repo_full', kwargs = {'git_exclude_patterns': '*.rst'}, srcdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full') outdir = '/tmp/tmp81nengcp', args = ['/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full', '/tmp/tmp81nengcp', '-W', '-v', '-Dgit_exclude_patterns=*.rst'] result = 2, @py_assert2 = 0, @py_assert1 = False, @py_format4 = '2 == 0' def run_sphinx(subdir, **kwargs): srcdir = Path(__file__).parent / subdir with tempfile.TemporaryDirectory() as outdir: args = [str(srcdir), outdir, '-W', '-v'] args.extend('-D{}={}'.format(k, v) for k, v in kwargs.items()) result = build_main(args) > assert result == 0 E assert 2 == 0 tests/test_example_repo.py:38: AssertionError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ Running Sphinx v6.1.3 ----------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------ Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in build_main app = Sphinx(args.sourcedir, args.confdir, args.outputdir, File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 202, in __init__ self.config = Config.read(self.confdir, confoverrides or {}, self.tags) File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 171, in read raise ConfigError(__("config directory doesn't contain a conf.py file (%s)") % sphinx.errors.ConfigError: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) Configuration error: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) _____________________________________________________________________________ test_exclude_patterns_deps_dates ______________________________________________________________________________ def test_exclude_patterns_deps_dates(): > data = run_sphinx( 'repo_full', git_exclude_patterns='example_module.py', ) tests/test_example_repo.py:160: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ subdir = 'repo_full', kwargs = {'git_exclude_patterns': 'example_module.py'}, srcdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full') outdir = '/tmp/tmpbznz_oj9' args = ['/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full', '/tmp/tmpbznz_oj9', '-W', '-v', '-Dgit_exclude_patterns=example_module.py'], result = 2 @py_assert2 = 0, @py_assert1 = False, @py_format4 = '2 == 0' def run_sphinx(subdir, **kwargs): srcdir = Path(__file__).parent / subdir with tempfile.TemporaryDirectory() as outdir: args = [str(srcdir), outdir, '-W', '-v'] args.extend('-D{}={}'.format(k, v) for k, v in kwargs.items()) result = build_main(args) > assert result == 0 E assert 2 == 0 tests/test_example_repo.py:38: AssertionError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ Running Sphinx v6.1.3 ----------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------ Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in build_main app = Sphinx(args.sourcedir, args.confdir, args.outputdir, File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 202, in __init__ self.config = Config.read(self.confdir, confoverrides or {}, self.tags) File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 171, in read raise ConfigError(__("config directory doesn't contain a conf.py file (%s)") % sphinx.errors.ConfigError: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) Configuration error: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) ________________________________________________________________________________ test_exclude_commits_dates _________________________________________________________________________________ def test_exclude_commits_dates(): > data = run_sphinx( 'repo_full', git_exclude_commits='6bb90c6027c3788d3891f833f017dbf8d229e432') tests/test_example_repo.py:172: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ subdir = 'repo_full', kwargs = {'git_exclude_commits': '6bb90c6027c3788d3891f833f017dbf8d229e432'} srcdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full'), outdir = '/tmp/tmpl5_blqcq' args = ['/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full', '/tmp/tmpl5_blqcq', '-W', '-v', '-Dgit_exclude_commits=6bb90c6027c3788d3891f833f017dbf8d229e432'] result = 2, @py_assert2 = 0, @py_assert1 = False, @py_format4 = '2 == 0' def run_sphinx(subdir, **kwargs): srcdir = Path(__file__).parent / subdir with tempfile.TemporaryDirectory() as outdir: args = [str(srcdir), outdir, '-W', '-v'] args.extend('-D{}={}'.format(k, v) for k, v in kwargs.items()) result = build_main(args) > assert result == 0 E assert 2 == 0 tests/test_example_repo.py:38: AssertionError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ Running Sphinx v6.1.3 ----------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------ Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in build_main app = Sphinx(args.sourcedir, args.confdir, args.outputdir, File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 202, in __init__ self.config = Config.read(self.confdir, confoverrides or {}, self.tags) File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 171, in read raise ConfigError(__("config directory doesn't contain a conf.py file (%s)") % sphinx.errors.ConfigError: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) Configuration error: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) _______________________________________________________________________________ test_exclude_commits_warning ________________________________________________________________________________ capsys = <_pytest.capture.CaptureFixture object at 0x7f05d98e2a00> def test_exclude_commits_warning(capsys): with pytest.raises(AssertionError): run_sphinx( 'repo_full', git_exclude_commits='23d25d0b7ac4604b7a9545420b2f9de84daabe73') > assert 'unhandled files' in capsys.readouterr().err E assert 'unhandled files' in '\nTraceback (most recent call last):\n File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in bui...ory doesn\'t contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full)\n' E + where '\nTraceback (most recent call last):\n File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in bui...ory doesn\'t contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full)\n' = CaptureResult(out='Running Sphinx v6.1.3\n', err='\nTraceback (most recent call last):\n File "/usr/lib/python3.8/sit...ry doesn\'t contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full)\n').err E + where CaptureResult(out='Running Sphinx v6.1.3\n', err='\nTraceback (most recent call last):\n File "/usr/lib/python3.8/sit...ry doesn\'t contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full)\n') = >() E + where > = <_pytest.capture.CaptureFixture object at 0x7f05d98e2a00>.readouterr tests/test_example_repo.py:187: AssertionError ___________________________________________________________________________ test_exclude_commits_without_warning ____________________________________________________________________________ def test_exclude_commits_without_warning(): > data = run_sphinx( 'repo_full', suppress_warnings='git.unhandled_files', git_exclude_commits='23d25d0b7ac4604b7a9545420b2f9de84daabe73') tests/test_example_repo.py:191: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ subdir = 'repo_full', kwargs = {'git_exclude_commits': '23d25d0b7ac4604b7a9545420b2f9de84daabe73', 'suppress_warnings': 'git.unhandled_files'} srcdir = PosixPath('/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full'), outdir = '/tmp/tmpzkpzg6_a' args = ['/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full', '/tmp/tmpzkpzg6_a', '-W', '-v', '-Dsuppress_warnings=git.unhandled_files', '-Dgit_exclude_commits=23d25d0b7ac4604b7a9545420b2f9de84daabe73'] result = 2, @py_assert2 = 0, @py_assert1 = False, @py_format4 = '2 == 0' def run_sphinx(subdir, **kwargs): srcdir = Path(__file__).parent / subdir with tempfile.TemporaryDirectory() as outdir: args = [str(srcdir), outdir, '-W', '-v'] args.extend('-D{}={}'.format(k, v) for k, v in kwargs.items()) result = build_main(args) > assert result == 0 E assert 2 == 0 tests/test_example_repo.py:38: AssertionError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ Running Sphinx v6.1.3 ----------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------ Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in build_main app = Sphinx(args.sourcedir, args.confdir, args.outputdir, File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 202, in __init__ self.config = Config.read(self.confdir, confoverrides or {}, self.tags) File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 171, in read raise ConfigError(__("config directory doesn't contain a conf.py file (%s)") % sphinx.errors.ConfigError: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) Configuration error: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) ______________________________________________________________________________________ test_singlehtml ______________________________________________________________________________________ def test_singlehtml(): srcdir = Path(__file__).parent / 'repo_full' with tempfile.TemporaryDirectory() as outdir: args = [str(srcdir), outdir, '-W', '-v', '-b', 'singlehtml'] result = build_main(args) > assert result == 0 E assert 2 == 0 tests/test_singlehtml.py:12: AssertionError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ Running Sphinx v6.1.3 ----------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------ Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in build_main app = Sphinx(args.sourcedir, args.confdir, args.outputdir, File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 202, in __init__ self.config = Config.read(self.confdir, confoverrides or {}, self.tags) File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 171, in read raise ConfigError(__("config directory doesn't contain a conf.py file (%s)") % sphinx.errors.ConfigError: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) Configuration error: config directory doesn't contain a conf.py file (/home/tkloczko/rpmbuild/BUILD/sphinx-last-updated-by-git-0.3.4/tests/repo_full) ___________________________________________________________________________________ test_without_git_repo ___________________________________________________________________________________ capsys = <_pytest.capture.CaptureFixture object at 0x7f05d992fa60> def test_without_git_repo(capsys): with tempfile.TemporaryDirectory() as srcdir: assert create_and_run(srcdir) is None > assert 'Error getting data from Git' in capsys.readouterr().err E assert 'Error getting data from Git' in '\nTraceback (most recent call last):\n File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in bui...vided next time.\nA bug report can be filed in the tracker at . Thanks!\n' E + where '\nTraceback (most recent call last):\n File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in bui...vided next time.\nA bug report can be filed in the tracker at . Thanks!\n' = CaptureResult(out='Running Sphinx v6.1.3\n', err='\nTraceback (most recent call last):\n File "/usr/lib/python3.8/sit...ided next time.\nA bug report can be filed in the tracker at . Thanks!\n').err E + where CaptureResult(out='Running Sphinx v6.1.3\n', err='\nTraceback (most recent call last):\n File "/usr/lib/python3.8/sit...ided next time.\nA bug report can be filed in the tracker at . Thanks!\n') = >() E + where > = <_pytest.capture.CaptureFixture object at 0x7f05d992fa60>.readouterr tests/test_untracked.py:41: AssertionError ___________________________________________________________________________ test_without_git_repo_without_warning ___________________________________________________________________________ def test_without_git_repo_without_warning(): with tempfile.TemporaryDirectory() as srcdir: data = create_and_run(srcdir, suppress_warnings='git.subprocess_error') > assert data == ['None', 'undefined'] E AssertionError: assert None == ['None', 'undefined'] tests/test_untracked.py:47: AssertionError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ Running Sphinx v6.1.3 ----------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------ Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in build_main app = Sphinx(args.sourcedir, args.confdir, args.outputdir, File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 219, in __init__ self.setup_extension(extension) File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 398, in setup_extension self.registry.load_extension(self, extname) File "/usr/lib/python3.8/site-packages/sphinx/registry.py", line 443, in load_extension mod = import_module(extname) File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 843, in exec_module File "", line 219, in _call_with_frames_removed File "/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__init__.py", line 26, in from sphinx.util import progress_message File "", line 1039, in _handle_fromlist File "/usr/lib/python3.8/site-packages/sphinx/deprecation.py", line 46, in __getattr__ warnings.warn(f"The alias '{self._modname}.{name}' is deprecated, " sphinx.deprecation.RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.util.display.progress_message' instead. Check CHANGES for Sphinx API modifications. Exception occurred: File "/usr/lib/python3.8/site-packages/sphinx/deprecation.py", line 46, in __getattr__ warnings.warn(f"The alias '{self._modname}.{name}' is deprecated, " sphinx.deprecation.RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.util.display.progress_message' instead. Check CHANGES for Sphinx API modifications. The full traceback has been saved in /tmp/sphinx-err-y_l4m0kw.log, if you want to report the issue to the developers. Please also report this if it was a user error, so that a better error message can be provided next time. A bug report can be filed in the tracker at . Thanks! ________________________________________________________________________________ test_untracked_source_files ________________________________________________________________________________ def test_untracked_source_files(): test_dir = Path(__file__).parent with tempfile.TemporaryDirectory(dir=str(test_dir)) as srcdir: data = create_and_run(srcdir) > assert data == ['None', 'undefined'] E AssertionError: assert None == ['None', 'undefined'] tests/test_untracked.py:54: AssertionError ----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------ Running Sphinx v6.1.3 ----------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------ Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in build_main app = Sphinx(args.sourcedir, args.confdir, args.outputdir, File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 219, in __init__ self.setup_extension(extension) File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 398, in setup_extension self.registry.load_extension(self, extname) File "/usr/lib/python3.8/site-packages/sphinx/registry.py", line 443, in load_extension mod = import_module(extname) File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 843, in exec_module File "", line 219, in _call_with_frames_removed File "/usr/lib/python3.8/site-packages/sphinxcontrib/htmlhelp/__init__.py", line 26, in from sphinx.util import progress_message File "", line 1039, in _handle_fromlist File "/usr/lib/python3.8/site-packages/sphinx/deprecation.py", line 46, in __getattr__ warnings.warn(f"The alias '{self._modname}.{name}' is deprecated, " sphinx.deprecation.RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.util.display.progress_message' instead. Check CHANGES for Sphinx API modifications. Exception occurred: File "/usr/lib/python3.8/site-packages/sphinx/deprecation.py", line 46, in __getattr__ warnings.warn(f"The alias '{self._modname}.{name}' is deprecated, " sphinx.deprecation.RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.util.display.progress_message' instead. Check CHANGES for Sphinx API modifications. The full traceback has been saved in /tmp/sphinx-err-4g_dqkil.log, if you want to report the issue to the developers. Please also report this if it was a user error, so that a better error message can be provided next time. A bug report can be filed in the tracker at . Thanks! ---------- coverage: platform linux, python 3.8.16-final-0 ----------- ================================================================================== short test summary info ================================================================================== FAILED tests/test_example_repo.py::test_repo_full - assert 2 == 0 FAILED tests/test_example_repo.py::test_untracked_no_dependencies - assert 2 == 0 FAILED tests/test_example_repo.py::test_untracked_show_sourcelink - assert 2 == 0 FAILED tests/test_example_repo.py::test_untracked_no_dependencies_and_show_sourcelink - assert 2 == 0 FAILED tests/test_example_repo.py::test_repo_shallow - assert 'too shallow' in '\nTraceback (most recent call last):\n File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in bui... doesn\'t contain a conf.py file (/home... FAILED tests/test_example_repo.py::test_repo_shallow_without_warning - assert 2 == 0 FAILED tests/test_example_repo.py::test_custom_timezone - assert 2 == 0 FAILED tests/test_example_repo.py::test_no_git - assert '"git" command not found' in '\nTraceback (most recent call last):\n File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in bui...ory doesn\'t contain a conf... FAILED tests/test_example_repo.py::test_no_git_no_warning - assert 2 == 0 FAILED tests/test_example_repo.py::test_exclude_patterns_srcdir_relative - assert 2 == 0 FAILED tests/test_example_repo.py::test_exclude_patterns_glob - assert 2 == 0 FAILED tests/test_example_repo.py::test_exclude_patterns_deps_dates - assert 2 == 0 FAILED tests/test_example_repo.py::test_exclude_commits_dates - assert 2 == 0 FAILED tests/test_example_repo.py::test_exclude_commits_warning - assert 'unhandled files' in '\nTraceback (most recent call last):\n File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in bui...ory doesn\'t contain a conf.py file... FAILED tests/test_example_repo.py::test_exclude_commits_without_warning - assert 2 == 0 FAILED tests/test_singlehtml.py::test_singlehtml - assert 2 == 0 FAILED tests/test_untracked.py::test_without_git_repo - assert 'Error getting data from Git' in '\nTraceback (most recent call last):\n File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 279, in bui...vided next time.\nA bug... FAILED tests/test_untracked.py::test_without_git_repo_without_warning - AssertionError: assert None == ['None', 'undefined'] FAILED tests/test_untracked.py::test_untracked_source_files - AssertionError: assert None == ['None', 'undefined'] ==================================================================================== 19 failed in 0.94s ===================================================================================== ```

Here is list of installed modules in build env

```console Package Version ----------------------------- ----------------- alabaster 0.7.13 attrs 22.2.0 Babel 2.12.1 build 0.10.0 charset-normalizer 3.1.0 coverage 7.2.1 distro 1.8.0 docutils 0.19 exceptiongroup 1.0.0 gpg 1.18.0-unknown idna 3.4 imagesize 1.4.1 importlib-metadata 6.1.0 iniconfig 2.0.0 Jinja2 3.1.2 libcomps 0.1.19 MarkupSafe 2.1.2 packaging 23.0 pip 23.0.1 pluggy 1.0.0 Pygments 2.14.0 pyproject_hooks 1.0.0 pytest 7.2.2 pytest-cov 4.0.0 python-dateutil 2.8.2 pytz 2023.2 requests 2.28.2 rpm 4.17.0 setuptools 65.6.3 six 1.16.0 snowballstemmer 2.2.0 Sphinx 6.1.3 sphinxcontrib-applehelp 1.0.4 sphinxcontrib-devhelp 1.0.2.dev20230202 sphinxcontrib-htmlhelp 2.0.0 sphinxcontrib-jsmath 1.0.1.dev20230128 sphinxcontrib-qthelp 1.0.3.dev20230128 sphinxcontrib-serializinghtml 1.1.5 tomli 2.0.1 urllib3 1.26.15 wheel 0.38.4 zipp 3.15.0 ```
mgeier commented 1 year ago

Yes, most tests not only require the checked-out Git repo, they also need the Git submodules to be checked out with https://github.com/mgeier/sphinx-last-updated-by-git/blob/master/tests/update_submodules.py.

kloczek commented 1 year ago

So what do you reccomend as method of testing your module on the system which is cut off from access to the public network? 🤔

mgeier commented 1 year ago

Maybe not test it at all?

Or if you want to check if the git command is found, you should be able to run the tests test_without_git_repo and test_without_git_repo_without_warning, which are the ones which don't need a Git repo (but they need the git command to be available).

mgeier commented 1 year ago

@kloczek Do you have any further questions? Or can we close this?

kloczek commented 1 year ago

Or if you want to check if the git command is found, you should be able to run the tests test_without_git_repo and test_without_git_repo_without_warning, which are the ones which don't need a Git repo (but they need the git command to be available).

@kloczek Do you have any further questions? Or can we close this?

It is still not clear for me what exactly I need to add to pytest params to avoid execution those units which needs git metadata 🤔

mgeier commented 1 year ago

You can try this:

python -m pytest -k test_without_git_repo

This should run the two tests I mentioned above and nothing else.

mgeier commented 1 year ago

@kloczek Did you make progress on this?

Do you need more help? Or can I close this issue?

kloczek commented 1 year ago

One sec .. just send upgraded package to automation 😋

mgeier commented 1 year ago

@kloczek Any updates?

mgeier commented 7 months ago

I assume everything is working now. If no, please let me know.

kloczek commented 7 months ago

python -m pytest -k test_without_git_repo

I think that it could be added pytest mark skipping automatically units which needs git repo metadata if there is no .git/ directory. 🤔

This should run the two tests I mentioned above and nothing else.

OK 👍