# HG changeset patch -- Bitbucket.org # Project py-trunk # URL http://bitbucket.org/hpk42/py-trunk/overview # User holger krekel <hol...@merlinux.eu> # Date 1273831363 -7200 # Node ID 89aab690e618d06c8bd2efe399fdacbb65d59317 # Parent 11fce19ddcd940f921845b7624b30cf45f452da7 adding three x-failing tests for issue88, issue93 and related issues
--- a/ISSUES.txt +++ b/ISSUES.txt @@ -167,3 +167,12 @@ objects containing global state. Often neccessary. This is about trying to get rid of them, i.e. deprecating them and checking with PyPy's usages as well as others. + +remove deprecated bits in collect.py +------------------------------------------------------------------- +tags: feature 1.4 + +In an effort to further simplify code, review and remove deprecated bits +in collect.py. Probably good: +- inline consider_file/dir methods, no need to have them + subclass-overridable because of hooks --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -105,3 +105,45 @@ class TestGeneralUsage: "*1 passed*", "*1 passed*", ]) + + + @py.test.mark.xfail + def test_early_skip(self, testdir): + testdir.mkdir("xyz") + testdir.makeconftest(""" + import py + def pytest_collect_directory(): + py.test.skip("early") + """) + result = testdir.runpytest() + assert result.ret == 0 + result.stdout.fnmatch_lines([ + "*1 skip*" + ]) + + + @py.test.mark.xfail + def test_issue88_initial_file_multinodes(self, testdir): + testdir.makeconftest(""" + import py + class MyFile(py.test.collect.File): + def collect(self): + return + def pytest_collect_file(path, parent): + return MyFile(path, parent) + """) + p = testdir.makepyfile("def test_hello(): pass") + result = testdir.runpytest(p, "--collectonly") + result.stdout.fnmatch_lines([ + "*MyFile*test_issue88*", + "*Module*test_issue88*", + ]) + + @py.test.mark.xfail + def test_issue93_initialnode_importing_capturing(self, testdir): + testdir.makeconftest(""" + print "should not be seen" + """) + result = testdir.runpytest() + assert result.ret == 0 + assert "should not be seen" not in result.stdout.str() _______________________________________________ py-svn mailing list py-svn@codespeak.net http://codespeak.net/mailman/listinfo/py-svn