Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unit test error when trying to package with pypi-install #228

Open
beren12 opened this issue Dec 21, 2022 · 2 comments
Open

unit test error when trying to package with pypi-install #228

beren12 opened this issue Dec 21, 2022 · 2 comments

Comments

@beren12
Copy link

beren12 commented Dec 21, 2022

Was trying to make things more simple and package this with an auto-packager on debian but it tells me a unit test is failing. I believe all deps are installed. The error is as follows:

stig.tui.views (unittest.loader._FailedTest) ... ERROR

======================================================================
ERROR: stig.tui.views (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: stig.tui.views
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/loader.py", line 470, in _find_test_path
    package = self._get_module_from_name(name)
  File "/usr/lib/python3.9/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/tmp/tmpmhndrrmw/deb_dist/stig-0.12.3a0/.pybuild/cpython3_3.9_stig/build/stig/tui/views/__init__.py", line 14, in <module>
    from . import hooks
  File "/tmp/tmpmhndrrmw/deb_dist/stig-0.12.3a0/.pybuild/cpython3_3.9_stig/build/stig/tui/views/hooks.py", line 13, in <module>
    from .file import TUICOLUMNS as FCOLUMNS
  File "/tmp/tmpmhndrrmw/deb_dist/stig-0.12.3a0/.pybuild/cpython3_3.9_stig/build/stig/tui/views/file.py", line 19, in <module>
    from .base import CellWidgetBase, Style
  File "/tmp/tmpmhndrrmw/deb_dist/stig-0.12.3a0/.pybuild/cpython3_3.9_stig/build/stig/tui/views/base.py", line 18, in <module>
    from ..tuiobjects import bottombar
  File "/tmp/tmpmhndrrmw/deb_dist/stig-0.12.3a0/.pybuild/cpython3_3.9_stig/build/stig/tui/tuiobjects.py", line 107, in <module>
    logwidget = LogWidget(height=int(objects.localcfg['tui.log.height']),
  File "/tmp/tmpmhndrrmw/deb_dist/stig-0.12.3a0/.pybuild/cpython3_3.9_stig/build/stig/tui/logger.py", line 57, in __init__
    self._handler.setFormatter(handlers[0].formatter)
IndexError: list index out of range


----------------------------------------------------------------------
Ran 1 test in 0.001s

FAILED (errors=1)
E: pybuild pybuild:353: test: plugin distutils failed with: exit code=1: cd /tmp/tmpmhndrrmw/deb_dist/stig-0.12.3a0/.pybuild/cpython3_3.9_stig/build; python3.9 -m unittest discover -v
dh_auto_test: error: pybuild --test -i python{version} -p 3.9 returned exit code 13
make: *** [debian/rules:7: build] Error 255
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
Traceback (most recent call last):
  File "/tmp/tmpmhndrrmw/deb_dist/tmp_py2dsc/stig-0.12.3a0/setup.py", line 27, in <module>
    setup(
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.9/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.9/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.9/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/usr/lib/python3/dist-packages/stdeb/command/bdist_deb.py", line 67, in run
    util.process_command(syscmd, cwd=target_dirs[0])
  File "/usr/lib/python3/dist-packages/stdeb/util.py", line 226, in process_command
    check_call(args, cwd=cwd)
  File "/usr/lib/python3/dist-packages/stdeb/util.py", line 59, in check_call
    raise CalledProcessError(retcode)
stdeb.util.CalledProcessError: 2
ERROR running: /usr/bin/python3 setup.py --command-packages stdeb.command sdist_dsc --dist-dir=/tmp/tmpmhndrrmw/deb_dist --use-premade-distfile=/tmp/tmpmhndrrmw/stig-0.12.3a0.tar.gz bdist_deb
ERROR in deb_dist/tmp_py2dsc/stig-0.12.3a0
Traceback (most recent call last):
  File "/usr/bin/pypi-install", line 79, in <module>
    main()
  File "/usr/bin/pypi-install", line 64, in main
    subprocess.check_call(cmd, shell=True)
  File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'py2dsc-deb stig-0.12.3a0.tar.gz' returned non-zero exit status 1.
@beren12
Copy link
Author

beren12 commented Dec 21, 2022

I'm not sure if it's an error on the pypi-install side or a unit test needs updating

@rndusr
Copy link
Owner

rndusr commented Dec 21, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants