flacjacket / pywayland

Python bindings for the libwayland library
Apache License 2.0
79 stars 16 forks source link

0.4.4: test/scanner_files/test_scanner_input.xml missing in pypi sdist tarball #27

Closed dvzrv closed 3 years ago

dvzrv commented 3 years ago

Hi! When packaging 0.4.4 for Arch Linux I attempted to run the tests against the project in that version.

Unfortunately test/scanner_files/test_scanner_input.xml is missing in the sdist tarball on pypi.org, which makes a subset of the tests fail:

============================= test session starts ==============================
platform linux -- Python 3.9.6, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python
cachedir: .pytest_cache
rootdir: /build/python-pywayland/src/python-pywayland-0.4.4
collecting ... collected 42 items / 2 deselected / 40 selected

test/test_client_destroy.py::test_client_destroy_listener PASSED         [  2%]
test/test_event_queue.py::test_event_queue PASSED                        [  5%]
test/test_protocol_interface.py::test_wl_interface[WlBuffer-<cdata>] PASSED [  7%]
test/test_protocol_interface.py::test_wl_interface[WlCallback-<cdata>] PASSED [ 10%]
test/test_protocol_interface.py::test_wl_interface[WlCompositor-<cdata>] PASSED [ 12%]
test/test_protocol_interface.py::test_wl_interface[WlDataDeviceManager-<cdata>] PASSED [ 15%]
test/test_protocol_interface.py::test_wl_interface[WlDataDevice-<cdata>] PASSED [ 17%]
test/test_protocol_interface.py::test_wl_interface[WlDataOffer-<cdata>] PASSED [ 20%]
test/test_protocol_interface.py::test_wl_interface[WlDataSource-<cdata>] PASSED [ 22%]
test/test_protocol_interface.py::test_wl_interface[WlDisplay-<cdata>] PASSED [ 25%]
test/test_protocol_interface.py::test_wl_interface[WlKeyboard-<cdata>] PASSED [ 27%]
test/test_protocol_interface.py::test_wl_interface[WlOutput-<cdata>] PASSED [ 30%]
test/test_protocol_interface.py::test_wl_interface[WlPointer-<cdata>] PASSED [ 32%]
test/test_protocol_interface.py::test_wl_interface[WlRegion-<cdata>] PASSED [ 35%]
test/test_protocol_interface.py::test_wl_interface[WlRegistry-<cdata>] PASSED [ 37%]
test/test_protocol_interface.py::test_wl_interface[WlSeat-<cdata>] PASSED [ 40%]
test/test_protocol_interface.py::test_wl_interface[WlShell-<cdata>] PASSED [ 42%]
test/test_protocol_interface.py::test_wl_interface[WlShellSurface-<cdata>] PASSED [ 45%]
test/test_protocol_interface.py::test_wl_interface[WlShmPool-<cdata>] PASSED [ 47%]
test/test_protocol_interface.py::test_wl_interface[WlShm-<cdata>] PASSED [ 50%]
test/test_protocol_interface.py::test_wl_interface[WlSubcompositor-<cdata>] PASSED [ 52%]
test/test_protocol_interface.py::test_wl_interface[WlSubsurface-<cdata>] PASSED [ 55%]
test/test_protocol_interface.py::test_wl_interface[WlSurface-<cdata>] PASSED [ 57%]
test/test_protocol_interface.py::test_wl_interface[WlTouch-<cdata>] PASSED [ 60%]
test/test_registry_bind.py::test_get_registry PASSED                     [ 62%]
test/test_registry_query.py::test_get_registry PASSED                    [ 65%]
test/test_resource.py::test_create_resource PASSED                       [ 67%]
test/test_resource.py::test_destroy_resource PASSED                      [ 70%]
test/test_scanner.py::test_interface[__init__.py] ERROR                  [ 72%]
test/test_scanner.py::test_interface[wl_core.py] ERROR                   [ 75%]
test/test_scanner.py::test_interface[wl_events.py] ERROR                 [ 77%]
test/test_scanner.py::test_interface[wl_requests.py] ERROR               [ 80%]
test/test_scanner.py::test_interface[wl_destructor.py] ERROR             [ 82%]
test/test_scanner.py::test_interface[wl_xfail.py] XFAIL                  [ 85%]
test/test_server_display.py::test_display_socket PASSED                  [ 87%]
test/test_server_eventloop.py::test_event_loop_post_dispatch_check PASSED [ 90%]
test/test_server_eventloop.py::test_event_loop_timer PASSED              [ 92%]
test/test_server_eventloop.py::test_event_loop_timer_updates PASSED      [ 95%]
test/test_server_eventloop.py::test_event_loop_destroy PASSED            [ 97%]
test/test_utils.py::test_anonymous_file PASSED                           [100%]

==================================== ERRORS ====================================
________________ ERROR at setup of test_interface[__init__.py] _________________

    @pytest.fixture(scope="session")
    def protocol_directory():
>       scanner = Protocol.parse_file(input_file)

test/test_scanner.py:37: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'pywayland.scanner.protocol.Protocol'>
input_file = '/build/python-pywayland/src/python-pywayland-0.4.4/test/scanner_files/test_scanner_input.xml'

    @classmethod
    def parse_file(cls, input_file: str) -> "Protocol":
        if not os.path.exists(input_file):
>           raise ValueError("Input xml file does not exist: {}".format(input_file))
E           ValueError: Input xml file does not exist: /build/python-pywayland/src/python-pywayland-0.4.4/test/scanner_files/test_scanner_input.xml

build/lib.linux-x86_64-3.9/pywayland/scanner/protocol.py:49: ValueError
_________________ ERROR at setup of test_interface[wl_core.py] _________________

    @pytest.fixture(scope="session")
    def protocol_directory():
>       scanner = Protocol.parse_file(input_file)

test/test_scanner.py:37: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'pywayland.scanner.protocol.Protocol'>
input_file = '/build/python-pywayland/src/python-pywayland-0.4.4/test/scanner_files/test_scanner_input.xml'

    @classmethod
    def parse_file(cls, input_file: str) -> "Protocol":
        if not os.path.exists(input_file):
>           raise ValueError("Input xml file does not exist: {}".format(input_file))
E           ValueError: Input xml file does not exist: /build/python-pywayland/src/python-pywayland-0.4.4/test/scanner_files/test_scanner_input.xml

build/lib.linux-x86_64-3.9/pywayland/scanner/protocol.py:49: ValueError
________________ ERROR at setup of test_interface[wl_events.py] ________________

    @pytest.fixture(scope="session")
    def protocol_directory():
>       scanner = Protocol.parse_file(input_file)

test/test_scanner.py:37: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'pywayland.scanner.protocol.Protocol'>
input_file = '/build/python-pywayland/src/python-pywayland-0.4.4/test/scanner_files/test_scanner_input.xml'

    @classmethod
    def parse_file(cls, input_file: str) -> "Protocol":
        if not os.path.exists(input_file):
>           raise ValueError("Input xml file does not exist: {}".format(input_file))
E           ValueError: Input xml file does not exist: /build/python-pywayland/src/python-pywayland-0.4.4/test/scanner_files/test_scanner_input.xml

build/lib.linux-x86_64-3.9/pywayland/scanner/protocol.py:49: ValueError
_______________ ERROR at setup of test_interface[wl_requests.py] _______________

    @pytest.fixture(scope="session")
    def protocol_directory():
>       scanner = Protocol.parse_file(input_file)

test/test_scanner.py:37: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'pywayland.scanner.protocol.Protocol'>
input_file = '/build/python-pywayland/src/python-pywayland-0.4.4/test/scanner_files/test_scanner_input.xml'

    @classmethod
    def parse_file(cls, input_file: str) -> "Protocol":
        if not os.path.exists(input_file):
>           raise ValueError("Input xml file does not exist: {}".format(input_file))
E           ValueError: Input xml file does not exist: /build/python-pywayland/src/python-pywayland-0.4.4/test/scanner_files/test_scanner_input.xml

build/lib.linux-x86_64-3.9/pywayland/scanner/protocol.py:49: ValueError
______________ ERROR at setup of test_interface[wl_destructor.py] ______________

    @pytest.fixture(scope="session")
    def protocol_directory():
>       scanner = Protocol.parse_file(input_file)

test/test_scanner.py:37: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'pywayland.scanner.protocol.Protocol'>
input_file = '/build/python-pywayland/src/python-pywayland-0.4.4/test/scanner_files/test_scanner_input.xml'

    @classmethod
    def parse_file(cls, input_file: str) -> "Protocol":
        if not os.path.exists(input_file):
>           raise ValueError("Input xml file does not exist: {}".format(input_file))
E           ValueError: Input xml file does not exist: /build/python-pywayland/src/python-pywayland-0.4.4/test/scanner_files/test_scanner_input.xml

build/lib.linux-x86_64-3.9/pywayland/scanner/protocol.py:49: ValueError
=============================== warnings summary ===============================
../../../../usr/lib/python3.9/site-packages/cffi/vengine_cpy.py:4
  /usr/lib/python3.9/site-packages/cffi/vengine_cpy.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import sys, imp

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
ERROR test/test_scanner.py::test_interface[__init__.py] - ValueError: Input x...
ERROR test/test_scanner.py::test_interface[wl_core.py] - ValueError: Input xm...
ERROR test/test_scanner.py::test_interface[wl_events.py] - ValueError: Input ...
ERROR test/test_scanner.py::test_interface[wl_requests.py] - ValueError: Inpu...
ERROR test/test_scanner.py::test_interface[wl_destructor.py] - ValueError: In...
======= 34 passed, 2 deselected, 1 xfailed, 1 warning, 5 errors in 1.96s =======
flacjacket commented 3 years ago

I updated what is in the manifest, and the xml files should be there now. Let me know if you are still having problems with this!

dvzrv commented 3 years ago

Thanks! 0.4.5 fixed it for me :)