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

PythonInterop5() public method

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

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

            var scope = py.CreateScope();
            py.Execute(@"
from System.Collections import ArrayList
class A(ArrayList):
  def Count(self): return 123
", scope);

            Assert(Engine.Execute<int>(@"
a = A().new
a.Count
", scope) == 123);
            
        }
Tests