コード例 #1
0
 def test_timestring_thu_1_july_2004_22_30_00(self):
     self.assertItemsEqual(bigquery_type("Thu, 1 July 2004 22:30:00"),
                           'timestamp')
コード例 #2
0
 def test_list_is_invalid_type(self):
     bigquery_type([1, 2, 3])
コード例 #3
0
 def test_isoformat_timestring(self):
     self.assertItemsEqual(bigquery_type(datetime.now().isoformat()),
                           'timestamp')
コード例 #4
0
 def test_timestring_thu_1_july_2004_22_30_00(self):
     self.assertItemsEqual(bigquery_type("Thu, 1 July 2004 22:30:00"),
                           'timestamp')
コード例 #5
0
 def test_timestring_arbitrary_fn_fail(self):
     self.assertItemsEqual(
         bigquery_type("February 20th 1973",
                       timestamp_parser=lambda x: False),
         'string')
コード例 #6
0
 def test_list_is_invalid_type(self):
     self.assertIsNone(bigquery_type([1, 2, 3]))
コード例 #7
0
 def test_int_is_integer(self):
     self.assertItemsEqual(bigquery_type(123), 'integer')
コード例 #8
0
 def test_timestring_feb_20_1973(self):
     six.assertCountEqual(self, bigquery_type("February 20th 1973"),
                          'timestamp')
コード例 #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')
コード例 #10
0
 def test_datetime_is_timestamp(self):
     six.assertCountEqual(self, bigquery_type(datetime.now()), 'timestamp')
コード例 #11
0
 def test_isoformat_timestring(self):
     six.assertCountEqual(self, bigquery_type(datetime.now().isoformat()),
                          'timestamp')
コード例 #12
0
 def test_int_is_integer(self):
     six.assertCountEqual(self, bigquery_type(123), 'integer')
コード例 #13
0
 def test_unicode_is_string(self):
     six.assertCountEqual(self,
                          bigquery_type(u"Here is a happy face \u263A"),
                          'string')
コード例 #14
0
 def test_str_is_string(self):
     six.assertCountEqual(self, bigquery_type("Bob"), 'string')
コード例 #15
0
 def test_timestring_next_thursday(self):
     self.assertItemsEqual(bigquery_type("February 20th 1973"), 'timestamp')
コード例 #16
0
 def test_today_is_not_timestring(self):
     six.assertCountEqual(self, bigquery_type("today"), 'string')
コード例 #17
0
 def test_timestring_arbitrary_fn_fail(self):
     self.assertItemsEqual(
         bigquery_type("February 20th 1973",
                       timestamp_parser=lambda x: False), 'string')
コード例 #18
0
 def test_timestring_next_thursday(self):
     six.assertCountEqual(self, bigquery_type("February 20th 1973"),
                          'timestamp')
コード例 #19
0
 def test_str_is_string(self):
     self.assertItemsEqual(bigquery_type("Bob"), 'string')
コード例 #20
0
 def test_timestring_arbitrary_fn_success(self):
     six.assertCountEqual(
         self, bigquery_type("whatever", timestamp_parser=lambda x: True),
         'timestamp')
コード例 #21
0
 def test_isoformat_timestring(self):
     self.assertItemsEqual(bigquery_type(datetime.now().isoformat()),
                           'timestamp')
コード例 #22
0
 def test_dict_is_record(self):
     six.assertCountEqual(self, bigquery_type({"a": 1}), 'record')
コード例 #23
0
 def test_timestring_next_thursday(self):
     self.assertItemsEqual(bigquery_type("February 20th 1973"), 'timestamp')
コード例 #24
0
 def test_str_is_string(self):
     six.assertCountEqual(self, bigquery_type("Bob"), 'string')
コード例 #25
0
 def test_list_is_invalid_type(self):
     self.assertIsNone(bigquery_type([1, 2, 3]))
コード例 #26
0
 def test_unicode_is_string(self):
     six.assertCountEqual(self, bigquery_type(u"Here is a happy face \u263A"),
                          'string')
コード例 #27
0
 def test_datetime_is_timestamp(self):
     self.assertItemsEqual(bigquery_type(datetime.now()), 'timestamp')
コード例 #28
0
 def test_int_is_integer(self):
     six.assertCountEqual(self, bigquery_type(123), 'integer')
コード例 #29
0
 def test_timestring_feb_20_1973(self):
     self.assertItemsEqual(bigquery_type("February 20th 1973"), 'timestamp')
コード例 #30
0
 def test_datetime_is_timestamp(self):
     six.assertCountEqual(self, bigquery_type(datetime.now()), 'timestamp')
コード例 #31
0
 def test_today_is_not_timestring(self):
     self.assertItemsEqual(bigquery_type("today"), 'string')
コード例 #32
0
 def test_isoformat_timestring(self):
     six.assertCountEqual(self, bigquery_type(datetime.now().isoformat()),
                          'timestamp')
コード例 #33
0
 def test_timestring_arbitrary_fn_success(self):
     self.assertItemsEqual(
         bigquery_type("whatever", timestamp_parser=lambda x: True),
         'timestamp')
コード例 #34
0
 def test_timestring_feb_20_1973(self):
     six.assertCountEqual(self, bigquery_type("February 20th 1973"),
                          'timestamp')
コード例 #35
0
    def test_class_instance_is_invalid_type(self):
        class SomeClass:
            pass

        self.assertIsNone(bigquery_type(SomeClass()))
コード例 #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')
コード例 #37
0
 def test_dict_is_record(self):
     self.assertItemsEqual(bigquery_type({"a": 1}), 'record')
コード例 #38
0
 def test_today_is_not_timestring(self):
     six.assertCountEqual(self, bigquery_type("today"), 'string')
コード例 #39
0
 def test_unicode_is_string(self):
     self.assertItemsEqual(bigquery_type(u"Here is a happy face \u263A"),
                           'string')
コード例 #40
0
 def test_timestring_next_thursday(self):
     six.assertCountEqual(self, bigquery_type("February 20th 1973"), 'timestamp')
コード例 #41
0
 def test_datetime_is_timestamp(self):
     self.assertItemsEqual(bigquery_type(datetime.now()), 'timestamp')
コード例 #42
0
 def test_timestring_arbitrary_fn_success(self):
     six.assertCountEqual(
         self, bigquery_type("whatever", timestamp_parser=lambda x: True),
         'timestamp')
コード例 #43
0
 def test_timestring_feb_20_1973(self):
     self.assertItemsEqual(bigquery_type("February 20th 1973"), 'timestamp')
コード例 #44
0
 def test_dict_is_record(self):
     six.assertCountEqual(self, bigquery_type({"a": 1}), 'record')
コード例 #45
0
 def test_today_is_not_timestring(self):
     self.assertItemsEqual(bigquery_type("today"), 'string')
コード例 #46
0
 def test_str_is_string(self):
     self.assertItemsEqual(bigquery_type("Bob"), 'string')
コード例 #47
0
 def test_timestring_arbitrary_fn_success(self):
     self.assertItemsEqual(
         bigquery_type("whatever", timestamp_parser=lambda x: True),
         'timestamp')
コード例 #48
0
 def test_unicode_is_string(self):
     self.assertItemsEqual(bigquery_type(u"Here is a happy face \u263A"),
                           'string')
コード例 #49
0
    def test_class_instance_is_invalid_type(self):
        class SomeClass:
            pass

        self.assertIsNone(bigquery_type(SomeClass()))
コード例 #50
0
 def test_int_is_integer(self):
     self.assertItemsEqual(bigquery_type(123), 'integer')
コード例 #51
0
 def test_dict_is_record(self):
     self.assertItemsEqual(bigquery_type({"a": 1}), 'record')
コード例 #52
0
    def test_class_instance_is_invalid_type(self):
        class SomeClass:
            pass

        bigquery_type(SomeClass())