In test steps:
I want to py.test to print line number and statment when excecute
step. Example, put "line 11: snmp_set(node)" when excecut
"snmp_set(node1)", Is it possible?
@pytest.mark.webtest
@pytest.mark.high
def test_send_http():
mylogger.info('\nInside Setup')
def test_something_quick():
snmp_set(node1)
print "\n test_something_quick"
def test_another():
pass
2013/2/25 Ronny Pfannschmidt <[email protected]>
> in what context ?
>
> On 02/25/2013 11:23 AM, 徐荣中 wrote:
>
>> Could I print "current line and statement" to |stdout| in |pytest|? I
>>
>> want to modify |pytest| files to achieve the following:
>>
>> |line9: snmp_get(node1.1)
>> line10: snmp_set(nod1.2)|
>>
>>
>> Anyone can tell me where to modify?
>>
>> Thanks!
>>
>>
>>
>> ______________________________**_________________
>> Pytest-dev mailing list
>> [email protected]
>> http://mail.python.org/**mailman/listinfo/pytest-dev<http://mail.python.org/mailman/listinfo/pytest-dev>
>>
>
>
_______________________________________________
Pytest-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pytest-dev