We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 52d1073 commit 240383cCopy full SHA for 240383c
pandas/io/tests/sas/test_sas7bdat.py
@@ -44,7 +44,8 @@ def test_from_buffer(self):
44
df0 = self.data[j]
45
for k in self.test_ix[j]:
46
fname = os.path.join(self.dirpath, "test%d.sas7bdat" % k)
47
- byts = open(fname, 'rb').read()
+ with open(fname, 'rb') as f:
48
+ byts = f.read()
49
buf = io.BytesIO(byts)
50
df = pd.read_sas(buf, format="sas7bdat", encoding='utf-8')
51
tm.assert_frame_equal(df, df0, check_exact=False)
@@ -54,7 +55,8 @@ def test_from_iterator(self):
54
55
56
57
58
59
60
61
rdr = pd.read_sas(buf, format="sas7bdat",
62
iterator=True, encoding='utf-8')
0 commit comments