|
13 | 13 |
|
14 | 14 | from pandas_gbq import gbq
|
15 | 15 |
|
16 |
| - |
17 | 16 | TABLE_ID = 'new_test'
|
18 | 17 |
|
19 | 18 |
|
20 | 19 | def _get_dataset_prefix_random():
|
21 | 20 | return ''.join(['pandas_gbq_', str(randint(1, 100000))])
|
22 | 21 |
|
23 | 22 |
|
24 |
| -@pytest.fixture(autouse=True, scope='module') |
25 |
| -def _test_imports(): |
| 23 | +def test_imports(): |
26 | 24 | try:
|
27 | 25 | import pkg_resources # noqa
|
28 | 26 | except ImportError:
|
@@ -392,7 +390,8 @@ def test_bad_project_id(self):
|
392 | 390 | with pytest.raises(gbq.GenericGBQException):
|
393 | 391 | gbq.read_gbq('SELCET * FROM [publicdata:samples.shakespeare]',
|
394 | 392 | project_id='not-my-project',
|
395 |
| - private_key=self.credentials) |
| 393 | + private_key=self.credentials, |
| 394 | + dialect='legacy') |
396 | 395 |
|
397 | 396 | def test_bad_table_name(self, project_id):
|
398 | 397 | with pytest.raises(gbq.GenericGBQException):
|
@@ -427,7 +426,7 @@ def test_zero_rows(self, project_id):
|
427 | 426 | ('is_bot', np.dtype(bool)), ('ts', 'M8[ns]')])
|
428 | 427 | expected_result = DataFrame(
|
429 | 428 | page_array, columns=['title', 'id', 'is_bot', 'ts'])
|
430 |
| - tm.assert_frame_equal(df, expected_result) |
| 429 | + tm.assert_frame_equal(df, expected_result, check_index_type=False) |
431 | 430 |
|
432 | 431 | def test_legacy_sql(self, project_id):
|
433 | 432 | legacy_sql = "SELECT id FROM [publicdata.samples.wikipedia] LIMIT 10"
|
@@ -655,6 +654,7 @@ def test_array_agg(self, project_id):
|
655 | 654 | tm.assert_frame_equal(df, DataFrame([["a", [1, 3]], ["b", [2]]],
|
656 | 655 | columns=["letter", "numbers"]))
|
657 | 656 |
|
| 657 | + # @pytest.mark.xfail |
658 | 658 | def test_array_of_floats(self, private_key_path, project_id):
|
659 | 659 | query = """select [1.1, 2.2, 3.3] as a, 4 as b"""
|
660 | 660 | df = gbq.read_gbq(query, project_id=project_id,
|
|
0 commit comments