pytest-uia 0.7.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. pytest_uia-0.7.1/.github/workflows/publish.yml +52 -0
  2. pytest_uia-0.7.1/.github/workflows/tests.yml +40 -0
  3. pytest_uia-0.7.1/.gitignore +8 -0
  4. pytest_uia-0.7.1/CHANGELOG.md +684 -0
  5. pytest_uia-0.7.1/LICENSE +21 -0
  6. pytest_uia-0.7.1/PKG-INFO +802 -0
  7. pytest_uia-0.7.1/README.md +762 -0
  8. pytest_uia-0.7.1/RELEASING.md +45 -0
  9. pytest_uia-0.7.1/ROADMAP.md +250 -0
  10. pytest_uia-0.7.1/pyproject.toml +88 -0
  11. pytest_uia-0.7.1/src/pytest_uia/__init__.py +48 -0
  12. pytest_uia-0.7.1/src/pytest_uia/__main__.py +171 -0
  13. pytest_uia-0.7.1/src/pytest_uia/adapters/__init__.py +0 -0
  14. pytest_uia-0.7.1/src/pytest_uia/adapters/capture.py +65 -0
  15. pytest_uia-0.7.1/src/pytest_uia/adapters/input.py +177 -0
  16. pytest_uia-0.7.1/src/pytest_uia/adapters/ocr.py +282 -0
  17. pytest_uia-0.7.1/src/pytest_uia/adapters/process_tree.py +116 -0
  18. pytest_uia-0.7.1/src/pytest_uia/adapters/uia.py +659 -0
  19. pytest_uia-0.7.1/src/pytest_uia/application/__init__.py +0 -0
  20. pytest_uia-0.7.1/src/pytest_uia/application/app_process.py +112 -0
  21. pytest_uia-0.7.1/src/pytest_uia/application/driver.py +465 -0
  22. pytest_uia-0.7.1/src/pytest_uia/application/session.py +197 -0
  23. pytest_uia-0.7.1/src/pytest_uia/domain/__init__.py +0 -0
  24. pytest_uia-0.7.1/src/pytest_uia/domain/dump.py +635 -0
  25. pytest_uia-0.7.1/src/pytest_uia/domain/errors.py +84 -0
  26. pytest_uia-0.7.1/src/pytest_uia/domain/locator.py +68 -0
  27. pytest_uia-0.7.1/src/pytest_uia/domain/query.py +61 -0
  28. pytest_uia-0.7.1/src/pytest_uia/domain/text_match.py +69 -0
  29. pytest_uia-0.7.1/src/pytest_uia/domain/tree.py +81 -0
  30. pytest_uia-0.7.1/src/pytest_uia/domain/waiting.py +48 -0
  31. pytest_uia-0.7.1/src/pytest_uia/hooks.py +72 -0
  32. pytest_uia-0.7.1/src/pytest_uia/plugin.py +14 -0
  33. pytest_uia-0.7.1/src/pytest_uia/py.typed +0 -0
  34. pytest_uia-0.7.1/tests/__init__.py +0 -0
  35. pytest_uia-0.7.1/tests/conftest.py +177 -0
  36. pytest_uia-0.7.1/tests/fixture_apps/legible.py +50 -0
  37. pytest_uia-0.7.1/tests/fixture_apps/tk_app.py +239 -0
  38. pytest_uia-0.7.1/tests/fixture_apps/tk_canvas_app.py +112 -0
  39. pytest_uia-0.7.1/tests/fixture_apps/tk_gallery_app.py +192 -0
  40. pytest_uia-0.7.1/tests/fixture_apps/tk_notebook_app.py +86 -0
  41. pytest_uia-0.7.1/tests/fixture_apps/winforms_app.ps1 +44 -0
  42. pytest_uia-0.7.1/tests/test_app_process.py +103 -0
  43. pytest_uia-0.7.1/tests/test_cli_dump.py +176 -0
  44. pytest_uia-0.7.1/tests/test_dead_app_end_to_end.py +124 -0
  45. pytest_uia-0.7.1/tests/test_dialog_end_to_end.py +125 -0
  46. pytest_uia-0.7.1/tests/test_driver.py +1253 -0
  47. pytest_uia-0.7.1/tests/test_dump_end_to_end.py +157 -0
  48. pytest_uia-0.7.1/tests/test_gui_fixture.py +166 -0
  49. pytest_uia-0.7.1/tests/test_locator_chain.py +134 -0
  50. pytest_uia-0.7.1/tests/test_ocr_element.py +247 -0
  51. pytest_uia-0.7.1/tests/test_ocr_end_to_end.py +138 -0
  52. pytest_uia-0.7.1/tests/test_package_surface.py +58 -0
  53. pytest_uia-0.7.1/tests/test_plugin_discovery.py +49 -0
  54. pytest_uia-0.7.1/tests/test_pointer_input.py +92 -0
  55. pytest_uia-0.7.1/tests/test_process_tree.py +82 -0
  56. pytest_uia-0.7.1/tests/test_public_api_end_to_end.py +81 -0
  57. pytest_uia-0.7.1/tests/test_session.py +312 -0
  58. pytest_uia-0.7.1/tests/test_text_match.py +63 -0
  59. pytest_uia-0.7.1/tests/test_tree_dump.py +915 -0
  60. pytest_uia-0.7.1/tests/test_uia_dead_window.py +184 -0
  61. pytest_uia-0.7.1/tests/test_uia_element_fallbacks.py +481 -0
  62. pytest_uia-0.7.1/tests/test_uia_end_to_end.py +233 -0
  63. pytest_uia-0.7.1/tests/test_uia_gallery_end_to_end.py +148 -0
  64. pytest_uia-0.7.1/tests/test_uia_hybrid_end_to_end.py +160 -0
  65. pytest_uia-0.7.1/tests/test_uia_notebook_end_to_end.py +135 -0
  66. pytest_uia-0.7.1/tests/test_uia_tk_end_to_end.py +123 -0
  67. pytest_uia-0.7.1/tests/test_uia_tree_walk.py +495 -0
  68. pytest_uia-0.7.1/tests/test_waiting.py +152 -0
@@ -0,0 +1,52 @@
1
+ # Publishes to PyPI via Trusted Publishing (OIDC); no API token is stored in this repo.
2
+ #
3
+ # One-time setup on PyPI before the first tag push, under Account settings >
4
+ # Publishing, add a pending publisher:
5
+ # PyPI project: pytest-uia
6
+ # Publisher: GitHub
7
+ # Owner: HuzPro
8
+ # Repository: pytest-uia
9
+ # Workflow: publish.yml
10
+ # Environment: pypi
11
+ # Until that publisher exists, this job runs fine up to the final step and then
12
+ # fails at "Publish to PyPI" because PyPI rejects the OIDC token exchange.
13
+
14
+ name: publish
15
+
16
+ on:
17
+ push:
18
+ tags: ["v*"]
19
+
20
+ permissions:
21
+ id-token: write
22
+ contents: read
23
+
24
+ jobs:
25
+ publish:
26
+ runs-on: ubuntu-latest
27
+ environment: pypi
28
+ steps:
29
+ - uses: actions/checkout@v4
30
+
31
+ - uses: actions/setup-python@v5
32
+ with:
33
+ python-version: "3.12"
34
+
35
+ # A mistyped tag must never publish a different version than it names.
36
+ - name: Verify tag matches package version
37
+ run: |
38
+ tag="${GITHUB_REF#refs/tags/}"
39
+ tagged_version="${tag#v}"
40
+ declared_version="$(sed -n 's/^__version__ = "\(.*\)"$/\1/p' src/pytest_uia/__init__.py)"
41
+ echo "tag=${tag} tagged_version=${tagged_version} declared_version=${declared_version}"
42
+ if [ "${tagged_version}" != "${declared_version}" ]; then
43
+ echo "::error::Tag ${tag} means version ${tagged_version}, but src/pytest_uia/__init__.py declares '${declared_version}'."
44
+ exit 1
45
+ fi
46
+
47
+ - run: python -m pip install --upgrade pip
48
+ - run: pip install build
49
+ - run: python -m build
50
+
51
+ - name: Publish to PyPI
52
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,40 @@
1
+ name: tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ jobs:
9
+ lint:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v7
13
+ - uses: actions/setup-python@v7
14
+ with:
15
+ python-version: "3.12"
16
+ - run: python -m pip install --upgrade pip
17
+ - run: pip install "ruff==0.16.*"
18
+ - run: ruff check src tests
19
+ - run: ruff format --check src tests
20
+
21
+ # The `gui` suite drives real windows and needs an interactive desktop it
22
+ # owns, so it is local-only in v1 (see ROADMAP). What runs here is everything
23
+ # else, on both platforms: Ubuntu proves the domain has stayed free of
24
+ # Windows and that the win32-marked dependencies install cleanly without it,
25
+ # Windows proves the adapters still import and their doubles still hold.
26
+ test:
27
+ strategy:
28
+ fail-fast: false
29
+ matrix:
30
+ os: [ubuntu-latest, windows-latest]
31
+ python-version: ["3.10", "3.13"]
32
+ runs-on: ${{ matrix.os }}
33
+ steps:
34
+ - uses: actions/checkout@v7
35
+ - uses: actions/setup-python@v7
36
+ with:
37
+ python-version: ${{ matrix.python-version }}
38
+ - run: python -m pip install --upgrade pip
39
+ - run: pip install -e ".[dev]"
40
+ - run: pytest -m "not gui" -q
@@ -0,0 +1,8 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ .venv/
5
+ .pytest_cache/
6
+ .ruff_cache/
7
+ dist/
8
+ build/