def test_timestring_thu_1_july_2004_22_30_00(self):
     self.assertItemsEqual(bigquery_type("Thu, 1 July 2004 22:30:00"),
                           'timestamp')
 def test_list_is_invalid_type(self):
     bigquery_type([1, 2, 3])
 def test_isoformat_timestring(self):
     self.assertItemsEqual(bigquery_type(datetime.now().isoformat()),
                           'timestamp')
 def test_timestring_thu_1_july_2004_22_30_00(self):
     self.assertItemsEqual(bigquery_type("Thu, 1 July 2004 22:30:00"),
                           'timestamp')
 def test_timestring_arbitrary_fn_fail(self):
     self.assertItemsEqual(
         bigquery_type("February 20th 1973",
                       timestamp_parser=lambda x: False),
         'string')
 def test_list_is_invalid_type(self):
     self.assertIsNone(bigquery_type([1, 2, 3]))
 def test_int_is_integer(self):
     self.assertItemsEqual(bigquery_type(123), 'integer')
Exemplo n.º 8
0
 def test_timestring_feb_20_1973(self):
     six.assertCountEqual(self, bigquery_type("February 20th 1973"),
                          'timestamp')
Exemplo n.º 9
0
 def test_timestring_thu_1_july_2004_22_30_00(self):
     six.assertCountEqual(self, bigquery_type("Thu, 1 July 2004 22:30:00"),
                          'timestamp')
Exemplo n.º 10
0
 def test_datetime_is_timestamp(self):
     six.assertCountEqual(self, bigquery_type(datetime.now()), 'timestamp')
Exemplo n.º 11
0
 def test_isoformat_timestring(self):
     six.assertCountEqual(self, bigquery_type(datetime.now().isoformat()),
                          'timestamp')
Exemplo n.º 12
0
 def test_int_is_integer(self):
     six.assertCountEqual(self, bigquery_type(123), 'integer')
Exemplo n.º 13
0
 def test_unicode_is_string(self):
     six.assertCountEqual(self,
                          bigquery_type(u"Here is a happy face \u263A"),
                          'string')
Exemplo n.º 14
0
 def test_str_is_string(self):
     six.assertCountEqual(self, bigquery_type("Bob"), 'string')
Exemplo n.º 15
0
 def test_timestring_next_thursday(self):
     self.assertItemsEqual(bigquery_type("February 20th 1973"), 'timestamp')
Exemplo n.º 16
0
 def test_today_is_not_timestring(self):
     six.assertCountEqual(self, bigquery_type("today"), 'string')
Exemplo n.º 17
0
 def test_timestring_arbitrary_fn_fail(self):
     self.assertItemsEqual(
         bigquery_type("February 20th 1973",
                       timestamp_parser=lambda x: False), 'string')
Exemplo n.º 18
0
 def test_timestring_next_thursday(self):
     six.assertCountEqual(self, bigquery_type("February 20th 1973"),
                          'timestamp')
 def test_str_is_string(self):
     self.assertItemsEqual(bigquery_type("Bob"), 'string')
Exemplo n.º 20
0
 def test_timestring_arbitrary_fn_success(self):
     six.assertCountEqual(
         self, bigquery_type("whatever", timestamp_parser=lambda x: True),
         'timestamp')
 def test_isoformat_timestring(self):
     self.assertItemsEqual(bigquery_type(datetime.now().isoformat()),
                           'timestamp')
Exemplo n.º 22
0
 def test_dict_is_record(self):
     six.assertCountEqual(self, bigquery_type({"a": 1}), 'record')
 def test_timestring_next_thursday(self):
     self.assertItemsEqual(bigquery_type("February 20th 1973"), 'timestamp')
Exemplo n.º 24
0
 def test_str_is_string(self):
     six.assertCountEqual(self, bigquery_type("Bob"), 'string')
 def test_list_is_invalid_type(self):
     self.assertIsNone(bigquery_type([1, 2, 3]))
Exemplo n.º 26
0
 def test_unicode_is_string(self):
     six.assertCountEqual(self, bigquery_type(u"Here is a happy face \u263A"),
                          'string')
Exemplo n.º 27
0
 def test_datetime_is_timestamp(self):
     self.assertItemsEqual(bigquery_type(datetime.now()), 'timestamp')
Exemplo n.º 28
0
 def test_int_is_integer(self):
     six.assertCountEqual(self, bigquery_type(123), 'integer')
Exemplo n.º 29
0
 def test_timestring_feb_20_1973(self):
     self.assertItemsEqual(bigquery_type("February 20th 1973"), 'timestamp')
Exemplo n.º 30
0
 def test_datetime_is_timestamp(self):
     six.assertCountEqual(self, bigquery_type(datetime.now()), 'timestamp')
Exemplo n.º 31
0
 def test_today_is_not_timestring(self):
     self.assertItemsEqual(bigquery_type("today"), 'string')
Exemplo n.º 32
0
 def test_isoformat_timestring(self):
     six.assertCountEqual(self, bigquery_type(datetime.now().isoformat()),
                          'timestamp')
Exemplo n.º 33
0
 def test_timestring_arbitrary_fn_success(self):
     self.assertItemsEqual(
         bigquery_type("whatever", timestamp_parser=lambda x: True),
         'timestamp')
Exemplo n.º 34
0
 def test_timestring_feb_20_1973(self):
     six.assertCountEqual(self, bigquery_type("February 20th 1973"),
                          'timestamp')
Exemplo n.º 35
0
    def test_class_instance_is_invalid_type(self):
        class SomeClass:
            pass

        self.assertIsNone(bigquery_type(SomeClass()))
Exemplo n.º 36
0
 def test_timestring_thu_1_july_2004_22_30_00(self):
     six.assertCountEqual(self, bigquery_type("Thu, 1 July 2004 22:30:00"),
                          'timestamp')
Exemplo n.º 37
0
 def test_dict_is_record(self):
     self.assertItemsEqual(bigquery_type({"a": 1}), 'record')
Exemplo n.º 38
0
 def test_today_is_not_timestring(self):
     six.assertCountEqual(self, bigquery_type("today"), 'string')
 def test_unicode_is_string(self):
     self.assertItemsEqual(bigquery_type(u"Here is a happy face \u263A"),
                           'string')
Exemplo n.º 40
0
 def test_timestring_next_thursday(self):
     six.assertCountEqual(self, bigquery_type("February 20th 1973"), 'timestamp')
 def test_datetime_is_timestamp(self):
     self.assertItemsEqual(bigquery_type(datetime.now()), 'timestamp')
Exemplo n.º 42
0
 def test_timestring_arbitrary_fn_success(self):
     six.assertCountEqual(
         self, bigquery_type("whatever", timestamp_parser=lambda x: True),
         'timestamp')
 def test_timestring_feb_20_1973(self):
     self.assertItemsEqual(bigquery_type("February 20th 1973"), 'timestamp')
Exemplo n.º 44
0
 def test_dict_is_record(self):
     six.assertCountEqual(self, bigquery_type({"a": 1}), 'record')
 def test_today_is_not_timestring(self):
     self.assertItemsEqual(bigquery_type("today"), 'string')
Exemplo n.º 46
0
 def test_str_is_string(self):
     self.assertItemsEqual(bigquery_type("Bob"), 'string')
 def test_timestring_arbitrary_fn_success(self):
     self.assertItemsEqual(
         bigquery_type("whatever", timestamp_parser=lambda x: True),
         'timestamp')
Exemplo n.º 48
0
 def test_unicode_is_string(self):
     self.assertItemsEqual(bigquery_type(u"Here is a happy face \u263A"),
                           'string')
    def test_class_instance_is_invalid_type(self):
        class SomeClass:
            pass

        self.assertIsNone(bigquery_type(SomeClass()))
Exemplo n.º 50
0
 def test_int_is_integer(self):
     self.assertItemsEqual(bigquery_type(123), 'integer')
 def test_dict_is_record(self):
     self.assertItemsEqual(bigquery_type({"a": 1}), 'record')
    def test_class_instance_is_invalid_type(self):
        class SomeClass:
            pass

        bigquery_type(SomeClass())