mirror of
https://github.com/tiqi-group/pydase.git
synced 2026-02-06 18:58:41 +01:00
fix: pathlib.Path signature annotation change in python 3.13
This commit is contained in:
@@ -1,10 +1,17 @@
|
|||||||
|
import sys
|
||||||
|
|
||||||
|
from pytest import LogCaptureFixture
|
||||||
|
|
||||||
import pydase
|
import pydase
|
||||||
import pydase.components
|
import pydase.components
|
||||||
from pydase.data_service.data_service_observer import DataServiceObserver
|
from pydase.data_service.data_service_observer import DataServiceObserver
|
||||||
from pydase.data_service.state_manager import StateManager
|
from pydase.data_service.state_manager import StateManager
|
||||||
from pydase.utils.serialization.serializer import dump
|
from pydase.utils.serialization.serializer import dump
|
||||||
from pytest import LogCaptureFixture
|
|
||||||
|
if sys.version_info < (3, 13):
|
||||||
|
PATHLIB_PATH = "pathlib.Path"
|
||||||
|
else:
|
||||||
|
PATHLIB_PATH = "pathlib._local.Path"
|
||||||
|
|
||||||
|
|
||||||
def test_image_functions(caplog: LogCaptureFixture) -> None:
|
def test_image_functions(caplog: LogCaptureFixture) -> None:
|
||||||
@@ -106,7 +113,7 @@ def test_image_serialization() -> None:
|
|||||||
"signature": {
|
"signature": {
|
||||||
"parameters": {
|
"parameters": {
|
||||||
"path": {
|
"path": {
|
||||||
"annotation": "pathlib.Path | str",
|
"annotation": f"{PATHLIB_PATH} | str",
|
||||||
"default": {},
|
"default": {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user