Skip to content

Run functional tests against LibVNCServer examples#303

Merged
sibson merged 1 commit into
mainfrom
codex/get-vncdocode-and-run-tests
Nov 2, 2025
Merged

Run functional tests against LibVNCServer examples#303
sibson merged 1 commit into
mainfrom
codex/get-vncdocode-and-run-tests

Conversation

@sibson

@sibson sibson commented Nov 2, 2025

Copy link
Copy Markdown
Owner

Summary

  • add helpers to build LibVNCServer example binaries and expose vncdotool CLIs without installation
  • update functional tests to launch the real example servers and vncdotool entry points instead of skipping
  • ensure the LibVNCServer makefile builds the example server used by screen capture tests

Testing

  • PYTHONPATH=. python -m unittest discover -t . -s tests/functional

https://chatgpt.com/codex/tasks/task_e_6906dc28027c8327a29ada194f314ccf


Edit (2026-06-16): Corrected the Testing command. The original pytest tests/functional -q happened to work under pytest, but unittest discover tests/functional (and make test-func) failed with "attempted relative import with no known parent package" — see #326. Running discovery with -t . keeps the tests.functional package context.

@sibson
sibson merged commit 07937ad into main Nov 2, 2025
10 checks passed
@sibson
sibson deleted the codex/get-vncdocode-and-run-tests branch November 2, 2025 14:14
@pmhahn

pmhahn commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

This fails for me:

$ PYTHONPATH=. pytest-3 tests/functional -q

======================================================================================== ERRORS ========================================================================================
____________________________________________________________________ ERROR collecting tests/functional/test_xvnc.py ____________________________________________________________________
ImportError while importing test module '…/vncdotool/tests/functional/test_xvnc.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/functional/test_xvnc.py:5: in <module>
    from pyvirtualdisplay import Display
E   ModuleNotFoundError: No module named 'pyvirtualdisplay'
=============================================================================== short test summary info ================================================================================
ERROR tests/functional/test_xvnc.py

Maybe also add pytest to requirements-dev.txt?

Also the way documented in DEVELOP.rst does not work:

$ make test-func
python3 -m unittest discover  tests/functional
EEE
======================================================================
ERROR: test_proxy (unittest.loader._FailedTest.test_proxy)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_proxy
Traceback (most recent call last):
  File "…/lib/python3.13/unittest/loader.py", line 396, in _find_test_path
    module = self._get_module_from_name(name)
  File "…/lib/python3.13/unittest/loader.py", line 339, in _get_module_from_name
    __import__(name)
    ~~~~~~~~~~^^^^^^
  File "…/tests/functional/test_proxy.py", line 9, in <module>
    from .cli import spawn_command
ImportError: attempted relative import with no known parent package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants