use of org.python.core.PyString in project cucumber-jvm by cucumber.
the class JythonStepDefinition method matchedArguments.
@Override
public List<Argument> matchedArguments(Step step) {
PyObject stepName = new PyString(step.getName());
PyObject matched_arguments = stepdef.invoke("matched_arguments", stepName);
if (matched_arguments instanceof PyList) {
return (PyList) matched_arguments;
} else {
return null;
}
}
use of org.python.core.PyString in project cucumber-jvm by cucumber.
the class JythonBackend method dataTableToPyArray.
private PyObject dataTableToPyArray(DataTable table) {
PyList pyTable = new PyList();
for (List<String> row : table.raw()) {
PyList pyRow = new PyList();
for (String cell : row) {
pyRow.append(new PyString(cell));
}
pyTable.append(pyRow);
}
return pyTable;
}