Files
pytest2/py/cmdline/testing/test_cmdline.py
hpk c17a09adaf [svn r62211] merge 60797:HEAD of pytestplugin branch:
this merge contains:

* a new plugin architecture
* a pluginized pytest core
* many pytest related refactorings
* refactorings/streamlining of pytest's own tests

--HG--
branch : trunk
2009-02-27 11:18:27 +01:00

19 lines
547 B
Python

pytest_plugins = "pytest_pytester"
class TestPyLookup:
def test_basic(self, testdir):
p = testdir.makepyfile(hello="def x(): pass")
result = testdir.runpybin("py.lookup", "pass")
result.stdout.fnmatch_lines(
['%s:*def x(): pass' %(p.basename)]
)
def test_search_in_filename(self, testdir):
p = testdir.makepyfile(hello="def x(): pass")
result = testdir.runpybin("py.lookup", "hello")
result.stdout.fnmatch_lines(
['*%s:*' %(p.basename)]
)