mirror of
https://github.com/bottlesdevs/Bottles.git
synced 2026-10-29 15:27:13 +08:00
* Add support for pre_script_args and post_script_args in Manager and WineExecutor * Add pre_script_args and post_script_args support in WineCommand and WineProgram Enhance the WineCommand and WineProgram classes to accept pre-run and post-run script arguments. Update the UI to include fields for these arguments in the launch options dialog. * Implement placeholder handling in WineExecutor and add unit tests * Enhance BottleConfig with YAML registration and improve placeholder handling in WineExecutor * Refactor BottleConfig to simplify YAML registration and enhance dataclass handling in yaml utility * Update tooltip texts and add translations for pre-run and post-run script arguments in launch options dialog * implement core infra for playtime tracking * add tests * implement signals * Refactor playtime signal tests to use ProcessStartedPayload and ProcessFinishedPayload for improved clarity and structure. * Use Result where needed * add debug logs * Add debug logging for playtime signal events and ensure proper database shutdown on exit * Refactor tests to use mocker instead of monkeypatch for WineExecutor and WinePath, improving test clarity and maintainability. * Add playtime tracking configuration options to gschema.xml, including enabling tracking and setting heartbeat interval. * move integration tests * Update development dependencies: add pytest-mock and freezegun to requirements.dev.txt * reset config.py * chore: change base to main * refactor: remove unused imports in executor.py * refactor: remove logging of executed command in WineCommand --------- Co-authored-by: Mirko Brombin <brombin94@gmail.com>
21 lines
455 B
Python
21 lines
455 B
Python
"""Pytest bootstrap for repository-local imports.
|
|
|
|
Ensures the repository root is on sys.path so `import bottles` works when
|
|
running `pytest` without installing the package.
|
|
"""
|
|
|
|
import os
|
|
import sys
|
|
|
|
|
|
def _add_repo_root_to_syspath() -> None:
|
|
this_dir = os.path.dirname(__file__)
|
|
repo_root = os.path.abspath(os.path.join(this_dir, os.pardir))
|
|
if repo_root not in sys.path:
|
|
sys.path.insert(0, repo_root)
|
|
|
|
|
|
_add_repo_root_to_syspath()
|
|
|
|
|