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

Tests fail using pybuild -- missing module license_expression? #92

Closed
jeremiah opened this issue Sep 8, 2021 · 4 comments
Closed

Tests fail using pybuild -- missing module license_expression? #92

jeremiah opened this issue Sep 8, 2021 · 4 comments

Comments

@jeremiah
Copy link
Contributor

jeremiah commented Sep 8, 2021

I: pybuild base:232: cd /home/jeremiah/Packaging/flict-0.1.1/.pybuild/cpython3_3.9/build; python3.9 -m unittest discover -v
test_oneway (tests.test_compat_matrix.TestOneWay) ... DEBUG:flict:['Compatibility*', 'AFL-2.0', 'AFL-2.1', 'AGPL-3.0-only', 'AGPL-3.0-or-later', 'Apache-1.0', 'Apache-1.1', 'Apache-2.0', 'Artistic-1.0-Perl', 'BSD-2-Clause', 'BSD-2-Clause-Patent', 'BSD-3-Clause', 'BSD-4-Clause', 'BSD-4-Clause-UC', 'BSL-1.0', 'bzip2-1.0.5', 'bzip2-1.0.6', 'CC0-1.0', 'CDDL-1.0', 'CPL-1.0', 'curl', 'EFL-2.0', 'EPL-1.0', 'EPL-2.0', 'EUPL-1.1', 'FTL', 'GPL-2.0-only', 'GPL-2.0-only WITH Classpath-exception-2.0', 'GPL-2.0-or-later', 'GPL-3.0-only', 'GPL-3.0-or-later', 'HPND', 'IBM-pibs', 'ICU', 'IJG', 'IPL-1.0', 'ISC', 'LGPL-2.1-only', 'LGPL-2.1-or-later', 'LGPL-3.0-only', 'LGPL-3.0-or-later', 'Libpng', 'libtiff', 'MirOS', 'MIT', 'MIT-CMU', 'MPL-1.1', 'MPL-2.0', 'MPL-2.0-no-copyleft-exception', 'MS-PL', 'MS-RL', 'NBPL-1.0', 'NTP', 'OpenSSL', 'OSL-3.0', 'Python-2.0', 'Qhull', 'RPL-1.5', 'SunPro', 'Unicode-DFS-2015', 'Unicode-DFS-2016', 'UPL-1.0', 'WTFPL', 'X11', 'XFree86-1.1', 'Zlib', 'zlib-acknowledgement', 'Permissive', 'Proprietary', 'Proprietary-linked', 'Public Domain', 'Compatibility'] cols: 72
Below test will output (stderr) a message that compatibility could not be checked
ERROR:flict:BSD is not a supported license.
ok
tests.test_license (unittest.loader._FailedTest) ... ERROR
tests.test_project (unittest.loader._FailedTest) ... ERROR

======================================================================
ERROR: tests.test_license (unittest.loader._FailedTest)

ImportError: Failed to import test module: tests.test_license
Traceback (most recent call last):
File "/usr/lib/python3.9/unittest/loader.py", line 436, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/lib/python3.9/unittest/loader.py", line 377, in _get_module_from_name
import(name)
File "/home/jeremiah/Packaging/flict-0.1.1/.pybuild/cpython3_3.9/build/tests/test_license.py", line 19, in
import flict.flictlib.license
File "/home/jeremiah/Packaging/flict-0.1.1/.pybuild/cpython3_3.9/build/flict/flictlib/license.py", line 17, in
from license_expression import LicenseSymbol
ModuleNotFoundError: No module named 'license_expression'

======================================================================
ERROR: tests.test_project (unittest.loader._FailedTest)

ImportError: Failed to import test module: tests.test_project
Traceback (most recent call last):
File "/usr/lib/python3.9/unittest/loader.py", line 436, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/lib/python3.9/unittest/loader.py", line 377, in _get_module_from_name
import(name)
File "/home/jeremiah/Packaging/flict-0.1.1/.pybuild/cpython3_3.9/build/tests/test_project.py", line 20, in
import flict.flictlib.license
File "/home/jeremiah/Packaging/flict-0.1.1/.pybuild/cpython3_3.9/build/flict/flictlib/license.py", line 17, in
from license_expression import LicenseSymbol
ModuleNotFoundError: No module named 'license_expression'


Ran 3 tests in 0.002s

FAILED (errors=2)

@hesa
Copy link
Contributor

hesa commented Sep 8, 2021

Did you install license_expression?

pip3 install license_expression

It's listed at the top of INSTALLATION, but not under Debian instructions. Fixing the latter now

@hesa
Copy link
Contributor

hesa commented Sep 8, 2021

Check out: #93

@hesa
Copy link
Contributor

hesa commented Sep 8, 2021

As a developer (you are when testing) you also need to install the dev deps, https://github.com/vinland-technology/flict/blob/main/INSTALLATION.md:

pip3 install -e .[dev]

Can you try that?

@jeremiah
Copy link
Contributor Author

jeremiah commented Sep 8, 2021

That worked!

@jeremiah jeremiah closed this as completed Sep 8, 2021
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