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

PythonInterop1() public method

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

            var py = Runtime.GetEngine("python");
            Engine.Execute(@"
class C
  def foo
    123
  end
end
");

            var result = py.Execute<int>(@"
import C
C().foo()
");
            Assert(result == 123);
        }
Tests