From 50ca89b5a682ba3059c3a2a44eb088959ef18944 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Sun, 11 Aug 2024 12:14:16 +0200 Subject: [PATCH] fix --- tests/zyp/conftest.py | 6 ++++++ tests/{transform => zyp}/test_recipe.py | 7 +++++++ tests/zyp/test_util.py | 10 +++++----- 3 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 tests/zyp/conftest.py rename tests/{transform => zyp}/test_recipe.py (98%) diff --git a/tests/zyp/conftest.py b/tests/zyp/conftest.py new file mode 100644 index 0000000..b3556e0 --- /dev/null +++ b/tests/zyp/conftest.py @@ -0,0 +1,6 @@ +# ruff: noqa: E402 +import pytest + +jmespath = pytest.importorskip("jmespath") +jsonpointer = pytest.importorskip("jsonpointer") +transon = pytest.importorskip("transon") diff --git a/tests/transform/test_recipe.py b/tests/zyp/test_recipe.py similarity index 98% rename from tests/transform/test_recipe.py rename to tests/zyp/test_recipe.py index acc9570..73452ff 100644 --- a/tests/transform/test_recipe.py +++ b/tests/zyp/test_recipe.py @@ -1,3 +1,10 @@ +# ruff: noqa: E402 +import pytest + +jmespath = pytest.importorskip("jmespath") +jsonpointer = pytest.importorskip("jsonpointer") +transon = pytest.importorskip("transon") + import datetime as dt import json from copy import deepcopy diff --git a/tests/zyp/test_util.py b/tests/zyp/test_util.py index 7e45661..b4a4dba 100644 --- a/tests/zyp/test_util.py +++ b/tests/zyp/test_util.py @@ -1,18 +1,18 @@ -import jmespath.parser +import jmespath import jq +import jsonpointer import pytest import transon from commons_codec.transform.model import compile_expression, to_pointer -from jsonpointer import JsonPointer def test_to_pointer_string(): - assert to_pointer("/") == JsonPointer("/") - assert to_pointer("") == JsonPointer("") + assert to_pointer("/") == jsonpointer.JsonPointer("/") + assert to_pointer("") == jsonpointer.JsonPointer("") def test_to_pointer_jsonpointer(): - assert to_pointer(JsonPointer("/")) == JsonPointer("/") + assert to_pointer(jsonpointer.JsonPointer("/")) == jsonpointer.JsonPointer("/") def test_to_pointer_none():