Comments (7)
After I forced the theme to sphinxdoc
, I get this:
Warning, treated as error:
/home/florian/proj/pytest-qt/docs/index.rst:234: WARNING: autodoc: failed to import class 'QtBot' from module 'pytestqt.plugin'; the following exception was raised:
Traceback (most recent call last):
File "/home/florian/proj/pytest-qt/.tox/docs/lib/python3.4/site-packages/sphinx/ext/autodoc.py", line 385, in import_object
__import__(self.modname)
File "/home/florian/proj/pytest-qt/pytestqt/plugin.py", line 57, in <module>
class QtBot(object):
File "/home/florian/proj/pytest-qt/pytestqt/plugin.py", line 49, in _inject_qtest_methods
method = create_qtest_proxy_method(method_name)
File "/home/florian/proj/pytest-qt/pytestqt/plugin.py", line 26, in create_qtest_proxy_method
functools.update_wrapper(result, qtest_method)
File "/home/florian/proj/pytest-qt/.tox/docs/lib/python3.4/functools.py", line 64, in update_wrapper
setattr(wrapper, attr, value)
TypeError: __qualname__ must be set to a string object
ERROR: InvocationError: '/home/florian/proj/pytest-qt/.tox/docs/bin/sphinx-build -q -E -W -b html . _build'
from pytest-qt.
Hmmm weird. I will take a look, thanks!
from pytest-qt.
An old local virtual environment was the reason I didn't notice it before. 😄 Thanks!
from pytest-qt.
I still get the TypeError
in the comment though.
from pytest-qt.
Hmm, I forgot to mention I ran that in Python 2.7... are you using 3.4?
Weird is that the error happens in functools
... perhaps that name is not a string
, but bytes
?
from pytest-qt.
It worked fine with basepython = python2
in tox.ini
indeed - I'm on Arch Linux which uses Python 3 for /usr/bin/python
.
I was confused why that error shows up when building docs only but not with real usage, and then remembered the Mock
used so no Qt backend is needed for building the docs. Then I found out this didn't handle __qualname__
(and __annotations__
) and added support for that in #50 - after that, docs seem to build fine here.
from pytest-qt.
Excellent, thanks! 😄
from pytest-qt.
Related Issues (20)
- How to use qapp_args() ? HOT 2
- How to reset qapp_args for each test class? HOT 6
- macos 14.0 (sonoma) doesn't pass control to qt HOT 16
- Tests using qtbot hang indefinitely on Mac OS Sonoma HOT 1
- How to test the following code...? HOT 1
- pytest-qt fails when snake_case feature is used in a test HOT 1
- How to use QAbstractItemModelTester? HOT 8
- test_exceptions_dont_leak fails with Python 3.12 HOT 7
- Intermittently missing property of object under test HOT 3
- More verbose tracebacks on exceptions in event loop HOT 1
- QDBusConnection.systemBus() leaks thread after qapp teardown HOT 3
- Clarification about methods like keyEvent, etc.? HOT 1
- Segfault on Linux with PyQt6 HOT 2
- "RuntimeError: Failed to disconnect" with `PySide6==6.7.0` HOT 19
- Crash on macOs Sonoma HOT 3
- SystemError on disconnect with pyside 6.7.1 HOT 7
- Clarify documentation around qtbot.waitSignals HOT 1
- _QtApi object has no attribute QtTest HOT 1
- qtbot.screenshot() changes test behavior HOT 4
- waitUntil page should link to waitUntil API doc and/or demonstrate use of the timeout param
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 pytest-qt.