(self, float_frame)
| 35 | assert s2.name == "B" |
| 36 | |
| 37 | def test_get_axis(self, float_frame): |
| 38 | f = float_frame |
| 39 | assert f._get_axis_number(0) == 0 |
| 40 | assert f._get_axis_number(1) == 1 |
| 41 | assert f._get_axis_number("index") == 0 |
| 42 | assert f._get_axis_number("rows") == 0 |
| 43 | assert f._get_axis_number("columns") == 1 |
| 44 | |
| 45 | assert f._get_axis_name(0) == "index" |
| 46 | assert f._get_axis_name(1) == "columns" |
| 47 | assert f._get_axis_name("index") == "index" |
| 48 | assert f._get_axis_name("rows") == "index" |
| 49 | assert f._get_axis_name("columns") == "columns" |
| 50 | |
| 51 | assert f._get_axis(0) is f.index |
| 52 | assert f._get_axis(1) is f.columns |
| 53 | |
| 54 | with pytest.raises(ValueError, match="No axis named"): |
| 55 | f._get_axis_number(2) |
| 56 | |
| 57 | with pytest.raises(ValueError, match="No axis.*foo"): |
| 58 | f._get_axis_name("foo") |
| 59 | |
| 60 | with pytest.raises(ValueError, match="No axis.*None"): |
| 61 | f._get_axis_name(None) |
| 62 | |
| 63 | with pytest.raises(ValueError, match="No axis named"): |
| 64 | f._get_axis_number(None) |
| 65 | |
| 66 | def test_column_contains_raises(self, float_frame): |
| 67 | with pytest.raises(TypeError, match="unhashable type: 'Index'"): |
nothing calls this directly
no test coverage detected