11from datetime import datetime , timedelta
22from typing import Any , Dict , Optional
33
4- import pytest
54from graphql .error import GraphQLError
65from graphql .language import ValueNode
76from graphql .pyutils import inspect
@@ -110,9 +109,6 @@ def resolve_seconds(root, _info, interval):
110109schema = GraphQLSchema (query = queryType )
111110
112111
113- @pytest .mark .skipif (
114- not hasattr (datetime , "fromisoformat" ), reason = "fromisoformat is new in Python 3.7+"
115- )
116112def test_shift_days ():
117113
118114 client = Client (schema = schema , parse_results = True , serialize_variables = True )
@@ -132,9 +128,6 @@ def test_shift_days():
132128 assert result ["shiftDays" ] == datetime .fromisoformat ("2021-11-17T11:58:13.461161" )
133129
134130
135- @pytest .mark .skipif (
136- not hasattr (datetime , "fromisoformat" ), reason = "fromisoformat is new in Python 3.7+"
137- )
138131def test_shift_days_serialized_manually_in_query ():
139132
140133 client = Client (schema = schema )
@@ -152,9 +145,6 @@ def test_shift_days_serialized_manually_in_query():
152145 assert result ["shiftDays" ] == datetime .fromisoformat ("2021-11-17T11:58:13.461161" )
153146
154147
155- @pytest .mark .skipif (
156- not hasattr (datetime , "fromisoformat" ), reason = "fromisoformat is new in Python 3.7+"
157- )
158148def test_shift_days_serialized_manually_in_variables ():
159149
160150 client = Client (schema = schema , parse_results = True )
@@ -172,9 +162,6 @@ def test_shift_days_serialized_manually_in_variables():
172162 assert result ["shiftDays" ] == datetime .fromisoformat ("2021-11-17T11:58:13.461161" )
173163
174164
175- @pytest .mark .skipif (
176- not hasattr (datetime , "fromisoformat" ), reason = "fromisoformat is new in Python 3.7+"
177- )
178165def test_latest ():
179166
180167 client = Client (schema = schema , parse_results = True )
@@ -197,9 +184,6 @@ def test_latest():
197184 assert result ["latest" ] == in_five_days
198185
199186
200- @pytest .mark .skipif (
201- not hasattr (datetime , "fromisoformat" ), reason = "fromisoformat is new in Python 3.7+"
202- )
203187def test_seconds ():
204188 client = Client (schema = schema )
205189
@@ -221,9 +205,6 @@ def test_seconds():
221205 assert result ["seconds" ] == 432000
222206
223207
224- @pytest .mark .skipif (
225- not hasattr (datetime , "fromisoformat" ), reason = "fromisoformat is new in Python 3.7+"
226- )
227208def test_seconds_omit_optional_start_argument ():
228209 client = Client (schema = schema )
229210
0 commit comments