Remove read_table deprecation (#27102) · pandas-dev/pandas@ad18ea3 (original) (raw)

`@@ -160,6 +160,7 @@ def test_read_non_existant(self, reader, module, error_class, fn_ext):

`

160

160

``

161

161

`@pytest.mark.parametrize('reader, module, error_class, fn_ext', [

`

162

162

` (pd.read_csv, 'os', FileNotFoundError, 'csv'),

`

``

163

`+

(pd.read_table, 'os', FileNotFoundError, 'csv'),

`

163

164

` (pd.read_fwf, 'os', FileNotFoundError, 'txt'),

`

164

165

` (pd.read_excel, 'xlrd', FileNotFoundError, 'xlsx'),

`

165

166

` (pd.read_feather, 'feather', Exception, 'feather'),

`

`@@ -191,18 +192,9 @@ def test_read_expands_user_home_dir(self, reader, module,

`

191

192

`msg1, msg2, msg3, msg4, msg5)):

`

192

193

`reader(path)

`

193

194

``

194

``

`-

def test_read_non_existant_read_table(self):

`

195

``

`-

path = os.path.join(HERE, 'data', 'does_not_exist.' + 'csv')

`

196

``

`-

msg1 = r"File b'.+does_not_exist.csv' does not exist"

`

197

``

`-

msg2 = (r"[Errno 2] File .+does_not_exist.csv does not exist:"

`

198

``

`-

r" '.+does_not_exist.csv'")

`

199

``

`-

with pytest.raises(FileNotFoundError, match=r"({}|{})".format(

`

200

``

`-

msg1, msg2)):

`

201

``

`-

with tm.assert_produces_warning(FutureWarning):

`

202

``

`-

pd.read_table(path)

`

203

``

-

204

195

`@pytest.mark.parametrize('reader, module, path', [

`

205

196

` (pd.read_csv, 'os', ('io', 'data', 'iris.csv')),

`

``

197

`+

(pd.read_table, 'os', ('io', 'data', 'iris.csv')),

`

206

198

` (pd.read_fwf, 'os', ('io', 'data', 'fixed_width_format.txt')),

`

207

199

` (pd.read_excel, 'xlrd', ('io', 'data', 'test1.xlsx')),

`

208

200

` (pd.read_feather, 'feather', ('io', 'data', 'feather-0_3_1.feather')),

`

`@@ -228,21 +220,6 @@ def test_read_fspath_all(self, reader, module, path, datapath):

`

228

220

`else:

`

229

221

`tm.assert_frame_equal(result, expected)

`

230

222

``

231

``

`-

def test_read_fspath_all_read_table(self, datapath):

`

232

``

`-

path = datapath('io', 'data', 'iris.csv')

`

233

``

-

234

``

`-

mypath = CustomFSPath(path)

`

235

``

`-

with tm.assert_produces_warning(FutureWarning):

`

236

``

`-

result = pd.read_table(mypath)

`

237

``

`-

with tm.assert_produces_warning(FutureWarning):

`

238

``

`-

expected = pd.read_table(path)

`

239

``

-

240

``

`-

if path.endswith('.pickle'):

`

241

``

`-

categorical

`

242

``

`-

tm.assert_categorical_equal(result, expected)

`

243

``

`-

else:

`

244

``

`-

tm.assert_frame_equal(result, expected)

`

245

``

-

246

223

`@pytest.mark.parametrize('writer_name, writer_kwargs, module', [

`

247

224

` ('to_csv', {}, 'os'),

`

248

225

` ('to_excel', {'engine': 'xlwt'}, 'xlwt'),

`