1
1
from datetime import datetime , timedelta
2
2
from typing import Any , Dict , Optional
3
3
4
- import pytest
5
4
from graphql .error import GraphQLError
6
5
from graphql .language import ValueNode
7
6
from graphql .pyutils import inspect
@@ -110,9 +109,6 @@ def resolve_seconds(root, _info, interval):
110
109
schema = GraphQLSchema (query = queryType )
111
110
112
111
113
- @pytest .mark .skipif (
114
- not hasattr (datetime , "fromisoformat" ), reason = "fromisoformat is new in Python 3.7+"
115
- )
116
112
def test_shift_days ():
117
113
118
114
client = Client (schema = schema , parse_results = True , serialize_variables = True )
@@ -132,9 +128,6 @@ def test_shift_days():
132
128
assert result ["shiftDays" ] == datetime .fromisoformat ("2021-11-17T11:58:13.461161" )
133
129
134
130
135
- @pytest .mark .skipif (
136
- not hasattr (datetime , "fromisoformat" ), reason = "fromisoformat is new in Python 3.7+"
137
- )
138
131
def test_shift_days_serialized_manually_in_query ():
139
132
140
133
client = Client (schema = schema )
@@ -152,9 +145,6 @@ def test_shift_days_serialized_manually_in_query():
152
145
assert result ["shiftDays" ] == datetime .fromisoformat ("2021-11-17T11:58:13.461161" )
153
146
154
147
155
- @pytest .mark .skipif (
156
- not hasattr (datetime , "fromisoformat" ), reason = "fromisoformat is new in Python 3.7+"
157
- )
158
148
def test_shift_days_serialized_manually_in_variables ():
159
149
160
150
client = Client (schema = schema , parse_results = True )
@@ -172,9 +162,6 @@ def test_shift_days_serialized_manually_in_variables():
172
162
assert result ["shiftDays" ] == datetime .fromisoformat ("2021-11-17T11:58:13.461161" )
173
163
174
164
175
- @pytest .mark .skipif (
176
- not hasattr (datetime , "fromisoformat" ), reason = "fromisoformat is new in Python 3.7+"
177
- )
178
165
def test_latest ():
179
166
180
167
client = Client (schema = schema , parse_results = True )
@@ -197,9 +184,6 @@ def test_latest():
197
184
assert result ["latest" ] == in_five_days
198
185
199
186
200
- @pytest .mark .skipif (
201
- not hasattr (datetime , "fromisoformat" ), reason = "fromisoformat is new in Python 3.7+"
202
- )
203
187
def test_seconds ():
204
188
client = Client (schema = schema )
205
189
@@ -221,9 +205,6 @@ def test_seconds():
221
205
assert result ["seconds" ] == 432000
222
206
223
207
224
- @pytest .mark .skipif (
225
- not hasattr (datetime , "fromisoformat" ), reason = "fromisoformat is new in Python 3.7+"
226
- )
227
208
def test_seconds_omit_optional_start_argument ():
228
209
client = Client (schema = schema )
229
210
0 commit comments