IronRuby.Tests.Tests.PythonInterop2 C# (CSharp) Method

PythonInterop2() public method

public PythonInterop2 ( ) : void
return void
        public void PythonInterop2() {
            if (!_driver.RunPython) return;

            var py = Runtime.GetEngine("python");

            py.Execute(@"
class C(object):
  def foo(self, a, b):
    return a + b
", Runtime.Globals);

            Assert(Engine.Execute<int>("C.new.foo(3,4)") == 7);
        }
Tests