GithubHelp home page GithubHelp logo

anyqt's People

Contributors

ales-erjavec avatar astaric avatar irgolic avatar jschueller avatar kernc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

anyqt's Issues

tests/test_qaction_set_menu.py fails to import when testing against pyside2

When attempting to run 0.1.1's test suite with pyside2 installed, I get the following test suite error:

python3.8 -m pytest -vv -ra -l -Wdefault --color=yes -o console_output_style=count -p no:cov -p no:flake8 -p no:flakes -p no:pylint -p no:markdown
========================================================= test session starts =========================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0 -- /tmp/portage/dev-python/anyqt-0.1.1/work/anyqt-0.1.1-python3_8/install/usr/bin/python3.8
cachedir: .pytest_cache
PySide2 5.15.2 -- Qt runtime 5.15.4 -- Qt compiled 5.15.4
metadata: {'Python': '3.8.13', 'Platform': 'Linux-5.17.14-gentoo-dist-x86_64-AMD_Ryzen_5_3600_6-Core_Processor-with-glibc2.34', 'Packages': {'pytest': '7.1.2', 'py': '1.11.0', 'pluggy': '1.0.0'}, 'Plugins': {'timeout': '2.1.0', 'pytest_param_files': '0.3.4', 'tornasync': '0.6.0.post2', 'nbval': '0.9.6', 'regressions': '2.3.1', 'mock': '3.7.0', 'django': '4.5.2', 'qt': '4.0.2', 'pylama': '8.3.8', 'pyfakefs': '4.5.6', 'console-scripts': '1.3.1', 'xdoctest': '1.0.0', 'metadata': '2.0.1', 'httpbin': '1.0.2', 'freezegun': '0.4.2', 'toolbox': '0.4', 'testinfra': '6.7.0', 'localserver': '0.6.0', 'xdist': '2.5.0', 'forked': '1.4.0', 'asyncio': '0.18.3', 'aiohttp': '1.0.4', 'datadir': '1.3.1', 'expect': '1.1.0', 'rerunfailures': '10.2', 'shutil': '1.7.0', 'virtualenv': '1.7.0', 'anyio': '3.6.1', 'skip-markers': '1.3.0', 'lazy-fixture': '0.6.3', 'betamax': '0.8.1', 'kgb': '7.0', 'services': '2.2.1', 'requests-mock': '1.9.3', 'subtesthack': '0.1.2', 'xprocess': '0.19.0', 'helpers-namespace': '2021.12.29', 'pkgcore': '0.12.11', 'typeguard': '2.13.3', 'httpx': '0.21.0', 'subtests': '0.8.0', 'xvfb': '2.0.0', 'shell-utilities': '1.5.0', 'snapshottest': '0.6.0', 'plus': '0.2', 'codeblocks': '0.16.1', 'Faker': '13.13.0', 'hypothesis': '6.47.2'}, 'JAVA_HOME': '/etc/java-config-2/current-system-vm'}
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/tmp/portage/dev-python/anyqt-0.1.1/work/anyqt-0.1.1/.hypothesis/examples')
rootdir: /tmp/portage/dev-python/anyqt-0.1.1/work/anyqt-0.1.1
plugins: timeout-2.1.0, pytest_param_files-0.3.4, tornasync-0.6.0.post2, nbval-0.9.6, regressions-2.3.1, mock-3.7.0, django-4.5.2, qt-4.0.2, pylama-8.3.8, pyfakefs-4.5.6, console-scripts-1.3.1, xdoctest-1.0.0, metadata-2.0.1, httpbin-1.0.2, freezegun-0.4.2, toolbox-0.4, testinfra-6.7.0, localserver-0.6.0, xdist-2.5.0, forked-1.4.0, asyncio-0.18.3, aiohttp-1.0.4, datadir-1.3.1, expect-1.1.0, rerunfailures-10.2, shutil-1.7.0, virtualenv-1.7.0, anyio-3.6.1, skip-markers-1.3.0, lazy-fixture-0.6.3, betamax-0.8.1, kgb-7.0, services-2.2.1, requests-mock-1.9.3, subtesthack-0.1.2, xprocess-0.19.0, helpers-namespace-2021.12.29, pkgcore-0.12.11, typeguard-2.13.3, httpx-0.21.0, subtests-0.8.0, xvfb-2.0.0, shell-utilities-1.5.0, snapshottest-0.6.0, plus-0.2, codeblocks-0.16.1, Faker-13.13.0, hypothesis-6.47.2
asyncio: mode=auto
collecting ... collected 4 items / 1 error

============================================================== ERRORS ================================================================
___________________________________________ ERROR collecting tests/test_qaction_set_menu.py ___________________________________________
ImportError while importing test module '/tmp/portage/dev-python/anyqt-0.1.1/work/anyqt-0.1.1/tests/test_qaction_set_menu.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.8/site-packages/_pytest/python.py:608: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:533: in import_path
    importlib.import_module(module_name)
/usr/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
/usr/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:168: in exec_module
    exec(co, module.__dict__)
tests/test_qaction_set_menu.py:3: in <module>
    from AnyQt.QtTest import QSignalSpy
E   ImportError: cannot import name 'QSignalSpy' from 'AnyQt.QtTest' (/tmp/portage/dev-python/anyqt-0.1.1/work/anyqt-0.1.1/AnyQt/QtTest
.py)
========================================================== warnings summary ===========================================================
../../../../../../usr/lib/python3.8/site-packages/pytest_aiohttp/plugin.py:28
  /usr/lib/python3.8/site-packages/pytest_aiohttp/plugin.py:28: DeprecationWarning: The 'asyncio_mode' is 'legacy', switching to 'auto'
 for the sake of pytest-aiohttp backward compatibility. Please explicitly use 'asyncio_mode=strict' or 'asyncio_mode=auto' in pytest co
nfiguration file.
    config.issue_config_time_warning(LEGACY_MODE, stacklevel=2)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================= short test summary info =======================================================
ERROR tests/test_qaction_set_menu.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
==================================================== 1 warning, 1 error in 12.81s =====================================================

FWIU pyside2 doesn't provide QSIgnalSpy. Could you please make the test handle this gracefully?

if _api == _api.QT_API_PYQT5 ?

is it ok to have conditions in the form if _api == _api.QT_API_PYQT5: in some modules (QtXml, ...)
everywhere else it seems to be like if _api.USED_API == _api.QT_API_PYQT5:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.