def test_col_order(self): dxp.box(x='price', y='neighborhood', data=airbnb, split='superhost', col='property_type', col_order=['House', 'Condominium'])
def test_x_order(self): dxp.box(x='price', y='neighborhood', data=airbnb, y_order=['Dupont Circle', 'Edgewood', 'Union Station']) with pytest.raises(ValueError): dxp.box(x='price', y='neighborhood', data=airbnb, y_order=['Dupont Circle', 'Edgewood', 'DOES NOT EXIST'])
def test_col_wrap(self): dxp.box(x='price', y='neighborhood', data=airbnb, split='superhost', col='property_type', wrap=2)
def test_row_col(self): dxp.box(x='price', y='neighborhood', data=airbnb, split='superhost', col='property_type', col_order=['House', 'Condominium', 'Apartment'], row='bedrooms', row_order=[0, 1, 2, 3])
def test_desc_values(self): fig = dxp.box(x='price', y='neighborhood', data=airbnb, sort_values='desc') ticklabels = [t.get_text() for t in fig.axes[0].get_xticklabels()] ticklabels = [label.replace('\n', ' ') for label in ticklabels]
def test_row(self): dxp.box(x='price', y='neighborhood', data=airbnb, split='superhost', row='property_type')
def test_stacked(self): dxp.box(x='price', y='neighborhood', data=airbnb, split='superhost', split_order=['Yes', 'No'])
def test_split(self): dxp.box(x='price', y='neighborhood', data=airbnb, split='superhost')
def test_vert(self): dxp.box(x='neighborhood', y='price', data=airbnb, orientation='v')
def test_lex_desc(self): fig = dxp.box(x='price', y='neighborhood', data=airbnb, sort='lex_desc') ticklabels = [t.get_text() for t in fig.axes[0].get_xticklabels()] correct = sorted(ticklabels, reverse=True) assert ticklabels == correct
def test_lex_asc(self): fig = dxp.box(x='price', y='neighborhood', data=airbnb) ticklabels = [t.get_text() for t in fig.axes[0].get_xticklabels()] correct = sorted(ticklabels) assert ticklabels == correct