From f5e9d91f7bbe8da68a0e383396182110c501c497 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Sun, 17 Jan 2010 10:54:36 +0100 Subject: [PATCH] fix deprecation warnings --HG-- branch : trunk --- doc/example/assertion/test_failures.py | 2 +- doc/example/funcarg/test_multi_python.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/example/assertion/test_failures.py b/doc/example/assertion/test_failures.py index a4d66bf1a..52983e26e 100644 --- a/doc/example/assertion/test_failures.py +++ b/doc/example/assertion/test_failures.py @@ -1,6 +1,6 @@ import py -failure_demo = py.magic.autopath().dirpath('failure_demo.py') +failure_demo = py.path.local(__file__).dirpath('failure_demo.py') pytest_plugins = "pytest_pytester" diff --git a/doc/example/funcarg/test_multi_python.py b/doc/example/funcarg/test_multi_python.py index 9c89f94ba..f2d3d88c1 100644 --- a/doc/example/funcarg/test_multi_python.py +++ b/doc/example/funcarg/test_multi_python.py @@ -11,7 +11,7 @@ pythonlist = ['python2.3', 'python2.4', 'python2.5', 'python2.6'] def pytest_generate_tests(metafunc): if 'python1' in metafunc.funcargnames: assert 'python2' in metafunc.funcargnames - for obj in metafunc.function.multiarg.obj: + for obj in metafunc.function.multiarg.kwargs['obj']: for py1 in pythonlist: for py2 in pythonlist: metafunc.addcall(id="%s-%s-%s" % (py1, py2, obj), @@ -61,5 +61,5 @@ class Python: if not res: raise SystemExit(1) """ % (str(self.picklefile), expression))) - print loadfile + print (loadfile) py.process.cmdexec("%s %s" %(self.pythonpath, loadfile))