I am a newbie to py.test , Please let me know how to run the py.test in PyScripter Editor. I have tried in the belwo way but it doesn't work.

import pytest

def func(x): return x + 1

def test_answer(): assert func(3) == 5

pytest.main()

Please refer the attached file for the error log.

Please help me out here i am stuck up because of this

Where do you find module pytest?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.