assertEquals(3, bound.__call__(Py.newString("nothello"), Py.One).asInt());
}
public void testThreadState() throws Exception {
PyBuiltinCallable bound = createBound("needsThreadState", STRING, THREAD_STATE, STRING);
ThreadState ts = Py.getThreadState();
PyObject expected = Py.newString("foo got state " + ts.hashCode());
assertEquals(expected, bound.__call__(Py.getThreadState(), Py.newString("foo")));
assertEquals(expected, bound.__call__(Py.newString("foo")));
ts = new ThreadState(new Thread(), ts.systemState);
assertEquals(Py.newString("foo got state " + ts.hashCode()),
bound.__call__(ts, Py.newString("foo")));
}