Skip to content

Commit ccf2b19

Browse files
committed
make the test more intersting
1 parent 28b9e92 commit ccf2b19

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/test_with_gc.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
import python from "@denosaurs/python";
1+
import python from "../mod.ts";
2+
import { assertEquals } from "./asserts.ts";
23

34
Deno.test("js fns are automaticlly converted to callbacks", () => {
45
const pyModule = python.runModule(
56
`
67
def call_the_callback(cb):
78
result = cb()
8-
return result
9+
return result + 1
910
`,
1011
"test_module",
1112
);
1213

13-
pyModule.call_the_callback(() => 4);
14+
assertEquals(pyModule.call_the_callback(() => 4).valueOf(), 5);
1415

1516
// @ts-ignore:requires: --v8-flags=--expose-gc
1617
gc(); // if this is comm

0 commit comments

Comments
 (0)