Skip to content

Commit eba54e9

Browse files
committed
TST: make TestLegacySupport setUpClass independent of current path.
1 parent e1552a6 commit eba54e9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pandas/tests/test_timeseries.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from datetime import datetime, time, timedelta
44
import sys
5+
import os
56
import unittest
67

78
import nose
@@ -401,10 +402,14 @@ class TestLegacySupport(unittest.TestCase):
401402

402403
@classmethod
403404
def setUpClass(cls):
404-
with open('pandas/tests/data/frame.pickle', 'r') as f:
405+
pth, _ = os.path.split(os.path.abspath(__file__))
406+
filepath = os.path.join(pth, 'data', 'frame.pickle')
407+
408+
with open(filepath, 'r') as f:
405409
cls.frame = pickle.load(f)
406410

407-
with open('pandas/tests/data/series.pickle', 'r') as f:
411+
filepath = os.path.join(pth, 'data', 'series.pickle')
412+
with open(filepath, 'r') as f:
408413
cls.series = pickle.load(f)
409414

410415
def test_unpickle_legacy_frame(self):

0 commit comments

Comments
 (0)