Comments (8)
Looks like with pytest 8.2.1 test suite is no0t able to pass collecting units
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-lupa-2.1-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-lupa-2.1-2.fc37.x86_64/usr/lib/python3.10/site-packages
+ /usr/bin/pytest -ra -m 'not network' lupa/tests/__init__.py lupa/tests/test.py
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.10.14, pytest-8.2.1, pluggy-1.5.0
rootdir: /home/tkloczko/rpmbuild/BUILD/lupa-lupa-2.1
configfile: pyproject.toml
plugins: flakes-4.0.5
collected 0 items / 1 error
========================================================================================== ERRORS ===========================================================================================
____________________________________________________________________________ ERROR collecting lupa/tests/test.py ____________________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/lupa-lupa-2.1/lupa/tests/test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
lupa/tests/test.py:2318: in <module>
@lupa.unpacks_lua_table
lupa/__init__.py:88: in __getattr__
lua = _newest_lib if _newest_lib is not None else _import_newest_lib()
lupa/__init__.py:65: in _import_newest_lib
_newest_lib = __import__(module_name[0], level=1, fromlist="*", globals=globals())
E ModuleNotFoundError: No module named 'lupa.lua'
================================================================================== short test summary info ==================================================================================
ERROR lupa/tests/test.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
===================================================================================== 1 error in 0.24s ======================================================================================
from lupa.
Just FTR .. tested 2.2 and pytest still fails the same way.
from lupa.
I don't use pytest myself. Try python -m unittest -v lupa.tests.suite
.
from lupa.
Correctly written unittest based test suite is correctly handled by pytest.
What is the propose of importing module in such strange way? 🤔
from lupa.
What is the propose of importing module in such strange way? 🤔
I can't find anything particularly strange about it, but the test suite is generated, or rather duplicated, for each Lua version module. Maybe that explains why it's not just a trivial import.
from lupa.
_newest_lib = __import__(module_name[0], level=1, fromlist="*", globals=globals())
from lupa.
That line imports the Lua module with the latest available version, after putting some effort into selecting it. It's a bit more than a simple import since it needs to work regardless of the number and versions of available Lua modules.
from lupa.
So why this import fails? 🤔
from lupa.
Related Issues (20)
- Error loading C modules in 2.x HOT 6
- Expose Lua load arguments (mode and chunkname) HOT 9
- Identity of wrapped Lua objects
- Deadlock involving __dealloc__ HOT 3
- [Feature Request] Async Overhaul
- [Feature Request] Expose Guts for better fine control.
- Ship Lua 5.1 with default lupa installation HOT 3
- pip install lupa fails on Windows HOT 2
- Terra HOT 1
- question: using python functions on lua tables HOT 2
- error lupa.lua54.LuaSyntaxError:
- Can Chinese name function functions be supported?
- Can't install lupa using pip HOT 3
- lua51 missing HOT 1
- 2.1 `pip install --upgrade lupa` not enough, `--force-reinstall` was needed HOT 4
- Unable to Import 'lua-utf8' in LuaJIT HOT 1
- Cython error: Lua "undeclared name not builtin: long" HOT 2
- 'popen' not supported
- How to pass a python dictionary as an argument into a function defined in LUA code?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lupa.