Refactor cel.test() to use pytest internally#694
Merged
chrisgregan merged 3 commits intomainfrom May 7, 2026
Merged
Conversation
Introduce a pytest-based integration test suite and hook it into the Python proxy build/run flow. Adds a new packages/celbridge/src/celbridge/integration_tests package (CelbridgeReporter, conftest, helpers and many test modules for app/document/explorer/file/file_edit/file_line_endings/package/query/spreadsheet/webview), and removes the old test_suite.py. celbridge.cel_proxy now delegates cel.test(...) to integration_tests.run_suite. Build changes: pyproject.toml adds pytest dependency; build.py no longer captures subprocess output; the .csproj includes recursive Python source globs and delegates wheel building to build.py for the net9.0 target. Also updates the checked-in wheel asset (Assets/Python/celbridge-0.1.0-py3-none-any.whl).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors and modernizes the Celbridge Python integration test suite by migrating it to pytest, introducing a custom test runner and reporter, and restructuring tests and fixtures for clarity and maintainability. It also updates the build process to delegate Python wheel building to a unified script, and makes minor dependency and code improvements.
Integration Test Suite Modernization
CelbridgeReporterthat provides clear, color-coded test output and integrates with the Celbridge logging system. The new reporter supports class name filtering, disables pytest's default terminal output, and ensures the Windows console state remains intact. (integration_tests/__init__.py)app,document, andexplorerfunctionality, each using pytest fixtures and helpers for setup and teardown. (test_app.py,test_document.py,test_explorer.py) [1] [2] [3]conftest.pywith session-scoped fixtures to provide access to Celbridge proxy modules in tests, replacing previous module-level globals. (integration_tests/conftest.py)helpers.pywith utility functions for common test operations, such as deleting resources, closing documents, and writing files with specific line endings. (integration_tests/helpers.py)cel_proxy.pyto use the newintegration_tests.run_suiteinstead of the previoustest_suite.main. (cel_proxy.py)Build and Dependency Updates
build.py(using system Python), simplifying the MSBuild logic and removing reliance on theuvtool and temp folders. (Celbridge.Python.csproj)pytestas a required dependency inpyproject.tomlto support the new test suite. (pyproject.toml)build.pyto remove unusedcapture_outputargument fromsubprocess.run. (build.py)