Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Linchin committed Apr 10, 2024
1 parent ae7ddc0 commit e9a17ce
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tests/unit/test__helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,27 +467,27 @@ def test_w_none_required(self):

def test_w_wrong_format(self):
range_field = _Field(
"NULLIBLE",
"NULLABLE",
field_type="RANGE",
range_element_type=_Field("NULLIBLE", element_type="DATE"),
range_element_type=_Field("NULLABLE", element_type="DATE"),
)
with self.assertRaises(ValueError):
self._call_fut("[2009-06-172019-06-17)", range_field)

def test_w_wrong_element_type(self):
range_field = _Field(
"NULLIBLE",
"NULLABLE",
field_type="RANGE",
range_element_type=_Field("NULLIBLE", element_type="TIME"),
range_element_type=_Field("NULLABLE", element_type="TIME"),
)
with self.assertRaises(ValueError):
self._call_fut("[15:31:38, 15:50:38)", range_field)

def test_w_unbounded_value(self):
range_field = _Field(
"NULLIBLE",
"NULLABLE",
field_type="RANGE",
range_element_type=_Field("NULLIBLE", element_type="DATE"),
range_element_type=_Field("NULLABLE", element_type="DATE"),
)
coerced = self._call_fut("[UNBOUNDED, 2019-06-17)", range_field)
self.assertEqual(
Expand All @@ -497,9 +497,9 @@ def test_w_unbounded_value(self):

def test_w_date_value(self):
range_field = _Field(
"NULLIBLE",
"NULLABLE",
field_type="RANGE",
range_element_type=_Field("NULLIBLE", element_type="DATE"),
range_element_type=_Field("NULLABLE", element_type="DATE"),
)
coerced = self._call_fut("[2009-06-17, 2019-06-17)", range_field)
self.assertEqual(
Expand All @@ -512,9 +512,9 @@ def test_w_date_value(self):

def test_w_datetime_value(self):
range_field = _Field(
"NULLIBLE",
"NULLABLE",
field_type="RANGE",
range_element_type=_Field("NULLIBLE", element_type="DATETIME"),
range_element_type=_Field("NULLABLE", element_type="DATETIME"),
)
coerced = self._call_fut(
"[2009-06-17T13:45:30, 2019-06-17T13:45:30)", range_field
Expand All @@ -531,9 +531,9 @@ def test_w_timestamp_value(self):
from google.cloud._helpers import _EPOCH

range_field = _Field(
"NULLIBLE",
"NULLABLE",
field_type="RANGE",
range_element_type=_Field("NULLIBLE", element_type="TIMESTAMP"),
range_element_type=_Field("NULLABLE", element_type="TIMESTAMP"),
)
coerced = self._call_fut("[1234567, 1234789)", range_field)
self.assertEqual(
Expand Down

0 comments on commit e9a17ce

Please sign in to comment.