1. ariovistus
  2. pyd

Source

pyd / examples / pyd_unittests / embedded.d

Diff from to

File examples/pyd_unittests/embedded.d

  • Ignore whitespace
             "import testing\n"
             "assert testing.a == \"doctor!\""
             );
+}
 
+unittest {
+    InterpContext c = new InterpContext();
+    c.locals["i"] = py(1);
+    c.j = py(2);
+    c.k = 4;
+    c.py_stmts(
+        "assert i == 1;"
+        "assert j == 2;"
+        "assert k == 4"
+        );
+   // (*^&^&* broken @property
+   // static assert(is(typeof(c.unicode("abc")) == PydObject));
 }
 
 void main() {}