Remove nodeid from messages for warnings generated by standard warnings

Standard warnings already contain the proper location, so we don't need
to also print the node id
This commit is contained in:
Bruno Oliveira
2018-09-03 20:13:41 -03:00
parent 0fffa6ba2f
commit 56d414177a
8 changed files with 43 additions and 29 deletions

View File

@@ -258,12 +258,11 @@ def record_property(request):
@pytest.fixture
def record_xml_property(record_property):
def record_xml_property(record_property, request):
"""(Deprecated) use record_property."""
import warnings
from _pytest import deprecated
warnings.warn(deprecated.RECORD_XML_PROPERTY, DeprecationWarning, stacklevel=2)
request.node.std_warn(deprecated.RECORD_XML_PROPERTY, DeprecationWarning)
return record_property