tobi-wan-kenobi / bumblebee-status

bumblebee-status is a modular, theme-able status line generator for the i3 window manager.
https://bumblebee-status.readthedocs.io/en/main/
MIT License
1.2k stars 228 forks source link

Test fails: unable to find theme default #880

Closed benthetechguy closed 1 year ago

benthetechguy commented 2 years ago

Bug Report

Description

Version used: PIP

I'm trying to package bumblebee-status for Debian, and one of the tests is failing. Here's the output:

I: pybuild base:239: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_bumblebee-status/build; python3.9 -m pytest tests
============================= test session starts ==============================
platform linux -- Python 3.9.12, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
rootdir: /<<PKGBUILDDIR>>
collected 282 items / 1 error / 24 skipped / 257 selected

==================================== ERRORS ====================================
_ ERROR collecting .pybuild/cpython3_3.9_bumblebee-status/build/tests/core/test_output.py _
tests/core/test_output.py:6: in <module>
    import core.output
bumblebee_status/core/output.py:142: in <module>
    class i3(object):
bumblebee_status/core/output.py:143: in i3
    def __init__(self, theme=core.theme.Theme(), config=core.config.Config([])):
bumblebee_status/core/theme.py:55: in __init__
    self.__data = raw_data if raw_data else self.load(name)
bumblebee_status/core/theme.py:81: in load
    raise RuntimeError("unable to find theme {}".format(name))
E   RuntimeError: unable to find theme default
=========================== short test summary info ============================
ERROR tests/core/test_output.py - RuntimeError: unable to find theme default
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
========================= 24 skipped, 1 error in 0.35s =========================
E: pybuild pybuild:369: test: plugin distutils failed with: exit code=2: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_bumblebee-status/build; python3.9 -m pytest tests

How to reproduce

Attempt to build Debian package here:

  1. Install Debian sid (unstable)
  2. sudo apt install build-essential devscripts git-buildpackage
  3. gbp clone https://salsa.debian.org/python-team/packages/bumblebee-status.git
  4. cd bumblebee-status
  5. sudo apt build-dep .
  6. gbp buildpackage
tobi-wan-kenobi commented 2 years ago

Will look into this, many thanks for the report, and many thanks for packaging!

tobi-wan-kenobi commented 2 years ago

Locally, and in the CI, the test passes. I think it might be because the Debian buold process copies the files into a temporary directory structure (PKGBUILDDIR) - do you know whether the relative path relationships are maintained and whether the themes folder is copied as well?

benthetechguy commented 2 years ago

I won't be able to test things today due to some work I have to do, but I believe the relative paths are maintained since you can see at the top it cds into the build dir first. As for whether the themes directory is copied, I'm not sure, but I would assume so if it's required for testing. When I have the ability to test, I'll enable the verbose option and attach a better build log that should explain exactly what's going on.

tobi-wan-kenobi commented 2 years ago

great, many thanks!

tobi-wan-kenobi commented 1 year ago

Closing due to inactivity, feel free to reopen if there's anything new.