Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/wapython
Path: blob/main/python/python-wasm/src/test/posix/other.test.ts
1067 views
1
import { syncPython } from "../../node";
2
3
test("test ctermid", async () => {
4
const { exec, repr } = await syncPython();
5
exec("import os");
6
expect(typeof repr("os.ctermid()")).toBe("string");
7
});
8
9
test("bindtextdomain doesn't crash (it is still basically a stub)", async () => {
10
const { exec, repr } = await syncPython();
11
exec("import gettext");
12
expect(eval(repr("gettext.bindtextdomain('foo','/bar')"))).toBe("/bar");
13
});
14
15