carlos-jenkins / plantweb

Plantweb is a Python client for the PlantUML server -
https://plantweb.readthedocs.io/
Apache License 2.0
27 stars 15 forks source link

1.2.1: pytest is failing with errors #22

Open kloczek opened 2 years ago

kloczek commented 2 years ago

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

May I ask for help because few units are failing:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-plantweb-1.2.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-plantweb-1.2.1-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
Using --randomly-seed=3831724006
rootdir: /home/tkloczko/rpmbuild/BUILD/plantweb-1.2.1, configfile: tox.ini
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, aspectlib-1.5.2, toolbox-0.5, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, flaky-3.7.0, benchmark-3.4.1, xdist-2.3.0, pylama-7.7.1, datadir-1.3.1, regressions-2.2.0, cases-3.6.3, xprocess-0.18.1, black-0.3.12, anyio-3.3.0, asyncio-0.15.1, trio-0.7.0, subtests-0.5.0, isort-2.0.0, hypothesis-6.14.6, mock-3.6.1, profiling-1.7.0, randomly-3.8.0, Faker-8.12.1, nose2pytest-1.0.8, pyfakefs-4.5.1, tornado-0.8.1, twisted-1.13.3
collected 9 items / 8 errors / 1 selected

================================================================================== ERRORS ==================================================================================
________________________________________________________________ ERROR collecting lib/plantweb/__main__.py _________________________________________________________________
/usr/lib/python3.8/site-packages/_pytest/runner.py:311: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3.8/site-packages/_pytest/runner.py:341: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/usr/lib/python3.8/site-packages/_pytest/doctest.py:532: in collect
    module = import_path(self.fspath)
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:544: in import_path
    raise ImportPathMismatchError(module_name, module_file, path)
E   _pytest.pathlib.ImportPathMismatchError: ('plantweb.__main__', '/home/tkloczko/rpmbuild/BUILDROOT/python-plantweb-1.2.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/plantweb/__main__.py', PosixPath('/home/tkloczko/rpmbuild/BUILD/plantweb-1.2.1/lib/plantweb/__main__.py'))
__________________________________________________________________ ERROR collecting lib/plantweb/args.py ___________________________________________________________________
/usr/lib/python3.8/site-packages/_pytest/runner.py:311: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3.8/site-packages/_pytest/runner.py:341: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/usr/lib/python3.8/site-packages/_pytest/doctest.py:532: in collect
    module = import_path(self.fspath)
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:544: in import_path
    raise ImportPathMismatchError(module_name, module_file, path)
E   _pytest.pathlib.ImportPathMismatchError: ('plantweb.args', '/home/tkloczko/rpmbuild/BUILDROOT/python-plantweb-1.2.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/plantweb/args.py', PosixPath('/home/tkloczko/rpmbuild/BUILD/plantweb-1.2.1/lib/plantweb/args.py'))
________________________________________________________________ ERROR collecting lib/plantweb/defaults.py _________________________________________________________________
/usr/lib/python3.8/site-packages/_pytest/runner.py:311: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3.8/site-packages/_pytest/runner.py:341: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/usr/lib/python3.8/site-packages/_pytest/doctest.py:532: in collect
    module = import_path(self.fspath)
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:544: in import_path
    raise ImportPathMismatchError(module_name, module_file, path)
E   _pytest.pathlib.ImportPathMismatchError: ('plantweb.defaults', '/home/tkloczko/rpmbuild/BUILDROOT/python-plantweb-1.2.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/plantweb/defaults.py', PosixPath('/home/tkloczko/rpmbuild/BUILD/plantweb-1.2.1/lib/plantweb/defaults.py'))
________________________________________________________________ ERROR collecting lib/plantweb/directive.py ________________________________________________________________
/usr/lib/python3.8/site-packages/_pytest/runner.py:311: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3.8/site-packages/_pytest/runner.py:341: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/usr/lib/python3.8/site-packages/_pytest/doctest.py:532: in collect
    module = import_path(self.fspath)
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:544: in import_path
    raise ImportPathMismatchError(module_name, module_file, path)
E   _pytest.pathlib.ImportPathMismatchError: ('plantweb.directive', '/home/tkloczko/rpmbuild/BUILDROOT/python-plantweb-1.2.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/plantweb/directive.py', PosixPath('/home/tkloczko/rpmbuild/BUILD/plantweb-1.2.1/lib/plantweb/directive.py'))
__________________________________________________________________ ERROR collecting lib/plantweb/main.py ___________________________________________________________________
/usr/lib/python3.8/site-packages/_pytest/runner.py:311: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3.8/site-packages/_pytest/runner.py:341: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/usr/lib/python3.8/site-packages/_pytest/doctest.py:532: in collect
    module = import_path(self.fspath)
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:544: in import_path
    raise ImportPathMismatchError(module_name, module_file, path)
E   _pytest.pathlib.ImportPathMismatchError: ('plantweb.main', '/home/tkloczko/rpmbuild/BUILDROOT/python-plantweb-1.2.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/plantweb/main.py', PosixPath('/home/tkloczko/rpmbuild/BUILD/plantweb-1.2.1/lib/plantweb/main.py'))
________________________________________________________________ ERROR collecting lib/plantweb/plantuml.py _________________________________________________________________
/usr/lib/python3.8/site-packages/_pytest/runner.py:311: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3.8/site-packages/_pytest/runner.py:341: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/usr/lib/python3.8/site-packages/_pytest/doctest.py:532: in collect
    module = import_path(self.fspath)
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:544: in import_path
    raise ImportPathMismatchError(module_name, module_file, path)
E   _pytest.pathlib.ImportPathMismatchError: ('plantweb.plantuml', '/home/tkloczko/rpmbuild/BUILDROOT/python-plantweb-1.2.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/plantweb/plantuml.py', PosixPath('/home/tkloczko/rpmbuild/BUILD/plantweb-1.2.1/lib/plantweb/plantuml.py'))
_________________________________________________________________ ERROR collecting lib/plantweb/render.py __________________________________________________________________
/usr/lib/python3.8/site-packages/_pytest/runner.py:311: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3.8/site-packages/_pytest/runner.py:341: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/usr/lib/python3.8/site-packages/_pytest/doctest.py:532: in collect
    module = import_path(self.fspath)
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:544: in import_path
    raise ImportPathMismatchError(module_name, module_file, path)
E   _pytest.pathlib.ImportPathMismatchError: ('plantweb.render', '/home/tkloczko/rpmbuild/BUILDROOT/python-plantweb-1.2.1-2.fc35.x86_64/usr/lib/python3.8/site-packages/plantweb/render.py', PosixPath('/home/tkloczko/rpmbuild/BUILD/plantweb-1.2.1/lib/plantweb/render.py'))
_________________________________________________________________ ERROR collecting test/sphinxconf/conf.py _________________________________________________________________
/usr/lib/python3.8/site-packages/_pytest/runner.py:311: in from_call
    result: Optional[TResult] = func()
/usr/lib/python3.8/site-packages/_pytest/runner.py:341: in <lambda>
    call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/usr/lib/python3.8/site-packages/_pytest/doctest.py:532: in collect
    module = import_path(self.fspath)
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:544: in import_path
    raise ImportPathMismatchError(module_name, module_file, path)
E   _pytest.pathlib.ImportPathMismatchError: ('conf', '/home/tkloczko/rpmbuild/BUILD/plantweb-1.2.1/doc/conf.py', PosixPath('/home/tkloczko/rpmbuild/BUILD/plantweb-1.2.1/test/sphinxconf/conf.py'))
========================================================================= short test summary info ==========================================================================
ERROR lib/plantweb/__main__.py - _pytest.pathlib.ImportPathMismatchError: ('plantweb.__main__', '/home/tkloczko/rpmbuild/BUILDROOT/python-plantweb-1.2.1-2.fc35.x86_64/us...
ERROR lib/plantweb/args.py - _pytest.pathlib.ImportPathMismatchError: ('plantweb.args', '/home/tkloczko/rpmbuild/BUILDROOT/python-plantweb-1.2.1-2.fc35.x86_64/usr/lib/py...
ERROR lib/plantweb/defaults.py - _pytest.pathlib.ImportPathMismatchError: ('plantweb.defaults', '/home/tkloczko/rpmbuild/BUILDROOT/python-plantweb-1.2.1-2.fc35.x86_64/us...
ERROR lib/plantweb/directive.py - _pytest.pathlib.ImportPathMismatchError: ('plantweb.directive', '/home/tkloczko/rpmbuild/BUILDROOT/python-plantweb-1.2.1-2.fc35.x86_64/...
ERROR lib/plantweb/main.py - _pytest.pathlib.ImportPathMismatchError: ('plantweb.main', '/home/tkloczko/rpmbuild/BUILDROOT/python-plantweb-1.2.1-2.fc35.x86_64/usr/lib/py...
ERROR lib/plantweb/plantuml.py - _pytest.pathlib.ImportPathMismatchError: ('plantweb.plantuml', '/home/tkloczko/rpmbuild/BUILDROOT/python-plantweb-1.2.1-2.fc35.x86_64/us...
ERROR lib/plantweb/render.py - _pytest.pathlib.ImportPathMismatchError: ('plantweb.render', '/home/tkloczko/rpmbuild/BUILDROOT/python-plantweb-1.2.1-2.fc35.x86_64/usr/li...
ERROR test/sphinxconf/conf.py - _pytest.pathlib.ImportPathMismatchError: ('conf', '/home/tkloczko/rpmbuild/BUILD/plantweb-1.2.1/doc/conf.py', PosixPath('/home/tkloczko/r...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 8 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================ 8 errors in 0.71s =============================================================================
pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo(<pr