Esempio n. 1
0
#!/usr/bin/env jython
import sys, inspect, os

jar_path = os.path.dirname(inspect.getfile(inspect.currentframe())) + "/cucumber-jython-full.jar"
sys.path.append(jar_path)

from java.io import File
from java.net import URLClassLoader
from cucumber.cli import Main
from cucumber.runtime import Runtime
from cucumber.runtime.jython import JythonBackend

url = File(jar_path).toURL()
cl = URLClassLoader([url], Main.getClassLoader())

def createRuntime(resourceLoader, gluePaths, classLoader, dryRun):
    # TODO - pass in current jython runtime - PythonInterpreter
    jythonBackend = JythonBackend(resourceLoader)
    return Runtime(resourceLoader, gluePaths, classLoader, [jythonBackend], dryRun)

Main.run(sys.argv[1:], cl)
Esempio n. 2
0
#!/usr/bin/env jython
import sys
from cucumber.cli import Main

Main.run(sys.argv[1:], Main.getClassLoader())
Esempio n. 3
0
#!/usr/bin/env jython
import sys, inspect, os

jar_path = os.path.dirname(inspect.getfile(inspect.currentframe())) + "/cucumber-jython-full.jar"
sys.path.append(jar_path)

from java.io import File
from java.net import URLClassLoader
from cucumber.cli import Main
from cucumber.runtime import Runtime
from cucumber.runtime.jython import JythonBackend

url = File(jar_path).toURL()
cl = URLClassLoader([url], Main.getClassLoader())

def createRuntime(resourceLoader, gluePaths, classLoader, dryRun):
    # TODO - pass in current jython runtime - PythonInterpreter
    jythonBackend = JythonBackend(resourceLoader)
    return Runtime(resourceLoader, gluePaths, classLoader, [jythonBackend], dryRun)

Main.run(sys.argv[1:], cl, createRuntime)
#!/usr/bin/env jython
import sys, inspect, os

cucumber_jython_path = os.path.dirname(inspect.getfile(inspect.currentframe())) + "/cucumber-jython.jar"
sys.path.append(cucumber_jython_path)

from java.io import File
from java.net import URLClassLoader
from cucumber.cli import Main
from cucumber.runtime import Runtime
from cucumber.runtime.jython import JythonBackend

cl = URLClassLoader([File(cucumber_jython_path).toURL()], Main.getClassLoader())

def createRuntime(resourceLoader, gluePaths, classLoader, dryRun):
    # TODO - pass in current jython runtime - PythonInterpreter
    jythonBackend = JythonBackend(resourceLoader)
    return Runtime(resourceLoader, gluePaths, classLoader, [jythonBackend], dryRun)

Main.run(sys.argv[1:], cl)
Esempio n. 5
0
#!/usr/bin/env jython
import sys, inspect, os

jar_path = os.path.dirname(inspect.getfile(
    inspect.currentframe())) + "/cucumber-jython-full.jar"
sys.path.append(jar_path)

from java.io import File
from java.net import URLClassLoader
from cucumber.cli import Main
from cucumber.runtime import Runtime
from cucumber.runtime.jython import JythonBackend

url = File(jar_path).toURL()
cl = URLClassLoader([url], Main.getClassLoader())


def createRuntime(resourceLoader, gluePaths, classLoader, dryRun):
    # TODO - pass in current jython runtime - PythonInterpreter
    jythonBackend = JythonBackend(resourceLoader)
    return Runtime(resourceLoader, gluePaths, classLoader, [jythonBackend],
                   dryRun)


Main.run(sys.argv[1:], cl)