Skip to content

TST: add back test_generic.py, accid removed in the big reorg #18114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 7, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more deprecation
  • Loading branch information
jreback committed Nov 7, 2017
commit 69c57f9af5798fe3f93f21d60a06e8adee1dec3f
21 changes: 11 additions & 10 deletions pandas/util/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ def get_locales(prefix=None, normalize=True,
"""
try:
raw_locales = locale_getter()
except:
except Exception:
return None

try:
Expand Down Expand Up @@ -757,7 +757,7 @@ def set_trace():
from IPython.core.debugger import Pdb
try:
Pdb(color_scheme='Linux').set_trace(sys._getframe().f_back)
except:
except Exception:
from pdb import Pdb as OldPdb
OldPdb().set_trace(sys._getframe().f_back)

Expand Down Expand Up @@ -1265,9 +1265,9 @@ def assert_series_equal(left, right, check_dtype=True,
check_dtype=check_dtype)
elif is_interval_dtype(left) or is_interval_dtype(right):
# TODO: big hack here
l = pd.IntervalIndex(left)
r = pd.IntervalIndex(right)
assert_index_equal(l, r, obj='{obj}.index'.format(obj=obj))
left = pd.IntervalIndex(left)
right = pd.IntervalIndex(right)
assert_index_equal(left, right, obj='{obj}.index'.format(obj=obj))

else:
_testing.assert_almost_equal(left.get_values(), right.get_values(),
Expand Down Expand Up @@ -1439,8 +1439,9 @@ def assert_panelnd_equal(left, right,
assert_index_equal(left_ind, right_ind, check_names=check_names)

if by_blocks:
rblocks = right.blocks
lblocks = left.blocks
with warnings.catch_warnings(record=True):
rblocks = right.blocks
lblocks = left.blocks
for dtype in list(set(list(lblocks.keys()) + list(rblocks.keys()))):
assert dtype in lblocks
assert dtype in rblocks
Expand Down Expand Up @@ -2345,7 +2346,7 @@ def wrapper(*args, **kwargs):

try:
e_str = traceback.format_exc(e)
except:
except Exception:
e_str = str(e)

if any([m.lower() in e_str.lower() for m in _skip_on_messages]):
Expand Down Expand Up @@ -2582,7 +2583,7 @@ def assert_produces_warning(expected_warning=Warning, filter_level="always",
for m in clear:
try:
m.__warningregistry__.clear()
except:
except Exception:
pass

saw_warning = False
Expand Down Expand Up @@ -2849,7 +2850,7 @@ def setTZ(tz):
if tz is None:
try:
del os.environ['TZ']
except:
except KeyError:
pass
else:
os.environ['TZ'] = tz
Expand Down