Skip to content

Commit

Permalink
use fixed value instead of now()
Browse files Browse the repository at this point in the history
  • Loading branch information
rhoboro committed Mar 13, 2018
1 parent 69147dd commit 05ac27b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pandas_gbq/tests/test_gbq.py
Original file line number Diff line number Diff line change
Expand Up @@ -1394,8 +1394,7 @@ def test_upload_data_with_timestamp(self):
test_size = 6
df = DataFrame(np.random.randn(test_size, 4), index=range(test_size),
columns=list('ABCD'))
test_timestamp = datetime.now(pytz.timezone('UTC'))
df['times'] = test_timestamp
df['times'] = np.datetime64('2018-03-13T05:40:45.348318Z')

gbq.to_gbq(
df, self.destination_table + test_id,
Expand All @@ -1409,8 +1408,8 @@ def test_upload_data_with_timestamp(self):

assert len(result_df) == test_size

expected = df['times'].astype('M8[ns]').sort_values()
result = result_df['times'].astype('M8[ns]').sort_values()
expected = df['times'].sort_values()
result = result_df['times'].sort_values()
tm.assert_numpy_array_equal(expected.values, result.values)

def test_list_dataset(self):
Expand Down

0 comments on commit 05ac27b

Please sign in to comment.