Skip to content
Prev Previous commit
Next Next commit
fixed skip message
  • Loading branch information
TomAugspurger committed Jan 29, 2019
commit 86948a1b52e67cbb432201ef499a685489320aa5
2 changes: 1 addition & 1 deletion pandas/tests/extension/numpy_/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@


def pytest_collection_modifyitems(config, items):
skip = pytest.mark.skip(reason="Skipping this because ...")
skip = pytest.mark.skip(reason="Skipping for nested data.")
for item in items:
# TODO: See if pytest has a better way to resolve the *value*
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be eager to hear of a better way to do this. Right now, we rely on the name being like TestMethods::test_where_series[object-True] do determine if we should skip. Not the cleanest. Ideally we would be able to resolve that to the actual value, but pytest may not have that yet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simonjayhawkins any thoughts here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TomAugspurger why don't you just add a marker to specific tests? (and skip on that)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not aware of a way for a test marker to get access to the value of another fixture.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we would be able to resolve that to the actual value, but pytest may not have that yet.

IIUC, from a test or fixture you get the value supplied to the fixture by including that (used by) fixture in the function signature. seems to work...

https://github.com/simonjayhawkins/pandas/blob/6ebf2c52d8925663a9242d3c58a069000b2c3f06/pandas/tests/io/formats/conftest.py#L141-L146

that would mean changing all the tests individually though. so this may not be what your after.

# supplied to a fixture. Right now .keywords gets things
Expand Down