Skip to content

Commit 9c4a8b8

Browse files
committed
Adjust TestKit SubTest parameters
1 parent c8c7c61 commit 9c4a8b8

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

testkitbackend/test_config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"'stub.server_side_routing.test_server_side_routing.TestServerSideRouting.test_direct_connection_with_url_params'":
1212
"Driver emits deprecation warning. Behavior will be unified in 6.0.",
1313
"neo4j.datatypes.test_temporal_types.TestDataTypes.test_should_echo_all_timezone_ids":
14-
"test_subtest_skips.tz_id",
14+
"test_subtest_skips.dt_conversion",
1515
"neo4j.datatypes.test_temporal_types.TestDataTypes.test_date_time_cypher_created_tz_id":
1616
"test_subtest_skips.tz_id"
1717
},

testkitbackend/test_subtest_skips.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
"""
2626

2727

28+
import pytz
29+
30+
from . import fromtestkit
31+
32+
2833
def tz_id(**params):
2934
# We could do this automatically, but with an explicit black list we
3035
# make sure we know what we test and what we don't.
@@ -51,3 +56,11 @@ def tz_id(**params):
5156
return (
5257
"timezone id %s is not supported by the system" % params["tz_id"]
5358
)
59+
60+
61+
def dt_conversion(**params):
62+
dt = params["dt"]
63+
try:
64+
fromtestkit.to_param(dt)
65+
except (pytz.UnknownTimeZoneError, ValueError) as e:
66+
return "cannot create desired dt %s: %r" % (dt, e)

0 commit comments

Comments
 (0)