Example #1
0
        public void TestImportAllFromScope()
        {
            using (Py.GIL())
            {
                ps.Set("bb", 100);
                ps.Set("cc", 10);

                using (var scope = ps.NewScope())
                {
                    scope.Exec("aa = bb + cc + 3");
                    var result = scope.Get <int>("aa");
                    Assert.AreEqual(113, result);
                }

                Assert.IsFalse(ps.Contains("aa"));
            }
        }