Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 19, 2024
1 parent 0ec69bf commit ef8ca91
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 3 additions & 2 deletions great_expectations/util.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from __future__ import annotations

from collections import OrderedDict

import copy
import datetime
import decimal
Expand All @@ -15,6 +13,7 @@
import sys
import time
import uuid
from collections import OrderedDict
from functools import wraps
from inspect import (
BoundArguments,
Expand All @@ -38,6 +37,7 @@
cast,
overload,
)

import numpy as np
import pandas as pd
from dateutil.parser import parse
Expand All @@ -47,6 +47,7 @@
from great_expectations.compatibility.sqlalchemy import LegacyRow, Row
from great_expectations.compatibility.sqlalchemy import sqlalchemy as sa
from great_expectations.compatibility.typing_extensions import override

# import of private class will be removed when deprecated methods are removed from this module
from great_expectations.exceptions import (
InvalidExpectationConfigurationError,
Expand Down
9 changes: 7 additions & 2 deletions tests/test_ge_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import datetime
import os
from typing import TYPE_CHECKING, Any

import pytest

import great_expectations as gx
Expand Down Expand Up @@ -561,14 +562,18 @@ def test_hyphen():


@pytest.mark.unit
@pytest.mark.parametrize("data", [pytest.param({"t": datetime.time(hour=1, minute=30, second=45)}, id="datetime.time")])
@pytest.mark.parametrize(
"data", [pytest.param({"t": datetime.time(hour=1, minute=30, second=45)}, id="datetime.time")]
)
def test_convert_to_json_serializable_converts_correctly(data: dict):
ret = convert_to_json_serializable(data)
assert ret == {"t": "01:30:45"}


@pytest.mark.unit
@pytest.mark.parametrize("data", [pytest.param({"t": datetime.time(hour=1, minute=30, second=45)}, id="datetime.time")])
@pytest.mark.parametrize(
"data", [pytest.param({"t": datetime.time(hour=1, minute=30, second=45)}, id="datetime.time")]
)
def test_ensure_json_serializable(data: dict):
ensure_json_serializable(data)
# Passes if no exception raised

0 comments on commit ef8ca91

Please sign in to comment.