Author: Armin Rigo <[email protected]>
Branch: hpy
Changeset: r98079:72227d40aa42
Date: 2019-11-16 19:12 +0100
http://bitbucket.org/pypy/pypy/changeset/72227d40aa42/
Log: Put the next test to pass
diff --git a/pypy/module/hpy_universal/test/test_basic.py
b/pypy/module/hpy_universal/test/test_basic.py
--- a/pypy/module/hpy_universal/test/test_basic.py
+++ b/pypy/module/hpy_universal/test/test_basic.py
@@ -21,3 +21,21 @@
assert mod.__loader__.name == 'mytest'
assert mod.__spec__.loader is mod.__loader__
assert mod.__file__
+
+ def test_different_name(self):
+ mod = self.make_module("""
+ @INIT
+ """, name="foo")
+ assert mod.__name__ == "foo"
+
+ def test_noop_function(self):
+ mod = self.make_module("""
+ HPy_FUNCTION(f)
+ static HPy f_impl(HPyContext ctx, HPy self, HPy args)
+ {
+ return HPyNone_Get(ctx);
+ }
+ @EXPORT f METH_NOARGS
+ @INIT
+ """)
+ assert mod.f() is None
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit