Files
pytest2/testing/cmdline/test_cmdline.py
holger krekel c8119d89b6 move test files out of py lib proper
* separate all tests from plugins
* simplify implicit inclusion of plugins under test
* have test_initpkg perform direct checks instead of yielding tests
* fix example tests for 3k

--HG--
branch : trunk
2009-09-06 16:59:39 +02: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)]
)