def test_as_dataframe_drop_parens():
df_hello, cohort = prep_test_cohort()
# test behavior with keep_paren_contents=False
with warnings.catch_warnings(record=True) as w:
warnings.simplefilter("always")
df = cohort.as_dataframe(rename_cols=True, keep_paren_contents=False, join_with='hello')
# skip test for warning since warning doesn't propagate (not sure why)
#ok_(len(w) > 0, 'no warning when duplicates resulting from rename_cols')
res = compare_column_names(expected = df_hello.columns,
observed = df.columns)
ok_(res, 'columns names failed to match expected')
评论列表
文章目录