accsyn-python-api 3.1.0__py3-none-any.whl → 3.2.1__py3-none-any.whl
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.
- accsyn_api/_devtools.py +30 -0
- accsyn_api/_version.py +1 -1
- accsyn_api/session.py +909 -330
- {accsyn_python_api-3.1.0.dist-info → accsyn_python_api-3.2.1.dist-info}/METADATA +52 -3
- accsyn_python_api-3.2.1.dist-info/RECORD +8 -0
- accsyn_python_api-3.2.1.dist-info/entry_points.txt +3 -0
- accsyn_python_api-3.1.0.dist-info/RECORD +0 -6
- {accsyn_python_api-3.1.0.dist-info → accsyn_python_api-3.2.1.dist-info}/WHEEL +0 -0
accsyn_api/_devtools.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import sys
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from typing import Optional, Sequence
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def run_pytest(argv: Optional[Sequence[str]] = None) -> int:
|
|
10
|
+
"""
|
|
11
|
+
Run pytest from the repository root, regardless of current working directory.
|
|
12
|
+
|
|
13
|
+
This makes `poetry run test` work even if invoked from e.g. `doc/`.
|
|
14
|
+
"""
|
|
15
|
+
repo_root = Path(__file__).resolve().parents[2]
|
|
16
|
+
os.chdir(repo_root)
|
|
17
|
+
|
|
18
|
+
args = list(sys.argv[1:] if argv is None else argv)
|
|
19
|
+
# Ensure we always pick up the project's pytest settings.
|
|
20
|
+
if "-c" not in args and "--config-file" not in args:
|
|
21
|
+
args = ["-c", str(repo_root / "pyproject.toml"), *args]
|
|
22
|
+
|
|
23
|
+
import pytest
|
|
24
|
+
|
|
25
|
+
return pytest.main(args)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def test() -> None:
|
|
29
|
+
"""Poetry script entrypoint: `poetry run test [pytest-args...]`."""
|
|
30
|
+
raise SystemExit(run_pytest())
|
accsyn_api/_version.py
CHANGED