Skip to content

Commit 3ed5a24

Browse files
committed
move test to travis test class
1 parent a64f67a commit 3ed5a24

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

pandas_gbq/tests/test_gbq.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,6 +1156,22 @@ def test_google_upload_errors_should_raise_exception(self):
11561156
gbq.to_gbq(bad_df, self.destination_table + test_id,
11571157
_get_project_id(), private_key=_get_private_key_path())
11581158

1159+
def test_upload_unicode_data(self):
1160+
test_id = "1"
1161+
test_size = 10
1162+
df = DataFrame(np.random.randn(6, 4), index=range(6),
1163+
columns=list('ABCD'))
1164+
df.A = u'信用卡'
1165+
1166+
gbq.to_gbq(df, self.destination_table + test_id, _get_project_id(),
1167+
chunksize=10000)
1168+
1169+
result = gbq.read_gbq("SELECT COUNT(*) AS num_rows FROM {0}".format(
1170+
self.destination_table + test_id),
1171+
project_id=_get_project_id())
1172+
1173+
assert result['num_rows'][0] == test_size
1174+
11591175
def test_generate_schema(self):
11601176
df = tm.makeMixedDataFrame()
11611177
schema = gbq._generate_bq_schema(df)
@@ -1469,22 +1485,6 @@ def test_upload_data(self):
14691485

14701486
assert result['num_rows'][0] == test_size
14711487

1472-
def test_upload_unicode_data(self):
1473-
test_id = "1"
1474-
test_size = 10
1475-
df = DataFrame(np.random.randn(6, 4), index=range(6),
1476-
columns=list('ABCD'))
1477-
df.A = u'信用卡'
1478-
1479-
gbq.to_gbq(df, self.destination_table + test_id, _get_project_id(),
1480-
chunksize=10000)
1481-
1482-
result = gbq.read_gbq("SELECT COUNT(*) AS num_rows FROM {0}".format(
1483-
self.destination_table + test_id),
1484-
project_id=_get_project_id())
1485-
1486-
assert result['num_rows'][0] == test_size
1487-
14881488

14891489
class TestToGBQIntegrationWithServiceAccountKeyContents(object):
14901490
# Changes to BigQuery table schema may take up to 2 minutes as of May 2015

0 commit comments

Comments
 (0)