move examples to doc directory

--HG--
branch : trunk
This commit is contained in:
holger krekel
2009-10-29 17:54:37 +01:00
parent 270ac2bc0d
commit 7aee121bd7
30 changed files with 0 additions and 1 deletions

View File

@@ -1 +0,0 @@
# XXX this file should not need to be here but is here for proper sys.path mangling

View File

@@ -1,24 +0,0 @@
import py
from mysetup2.myapp import MyApp
def pytest_funcarg__mysetup(request):
return MySetup(request)
def pytest_addoption(parser):
parser.addoption("--ssh", action="store", default=None,
help="specify ssh host to run tests with")
class MySetup:
def __init__(self, request):
self.config = request.config
def myapp(self):
return MyApp()
def getsshconnection(self):
host = self.config.option.ssh
if host is None:
py.test.skip("specify ssh host with --ssh")
return execnet.SshGateway(host)

View File

@@ -1,5 +0,0 @@
class MyApp:
def question(self):
return 6 * 9

View File

@@ -1,6 +0,0 @@
def test_answer(mysetup):
app = mysetup.myapp()
answer = app.question()
assert answer == 42

View File

@@ -1,5 +0,0 @@
class TestClass:
def test_function(self, mysetup):
conn = mysetup.getsshconnection()
# work with conn