[pypy-commit] pypy py3tests: fix test

rlamy pypy.commits at gmail.com
Wed May 9 21:26:34 EDT 2018


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3tests
Changeset: r94520:64d59e349b56
Date: 2018-05-10 02:21 +0100
http://bitbucket.org/pypy/pypy/changeset/64d59e349b56/

Log:	fix test

diff --git a/pypy/module/_demo/test/test_import.py b/pypy/module/_demo/test/test_import.py
--- a/pypy/module/_demo/test/test_import.py
+++ b/pypy/module/_demo/test/test_import.py
@@ -1,30 +1,30 @@
-from pypy.module import _demo
+from pypy.module._demo.moduledef import Module
 from pypy.tool.option import make_config, make_objspace
 
 class TestImport:
 
     def setup_method(self, func):
-        _demo.Module.demo_events = []
+        Module.demo_events = []
 
     def test_startup(self):
         config = make_config(None, usemodules=('_demo',))
         space = make_objspace(config)
         w_modules = space.sys.get('modules')
 
-        assert _demo.Module.demo_events == ['setup']
+        assert Module.demo_events == ['setup']
         assert not space.contains_w(w_modules, space.wrap('_demo'))
 
         # first import
         w_import = space.builtin.get('__import__')
         w_demo = space.call(w_import,
                             space.newlist([space.wrap('_demo')]))
-        assert _demo.Module.demo_events == ['setup', 'startup']
+        assert Module.demo_events == ['setup', 'startup']
 
         # reload the module, this should not call startup again
         space.delitem(w_modules,
                       space.wrap('_demo'))
         w_demo = space.call(w_import,
                             space.newlist([space.wrap('_demo')]))
-        assert _demo.Module.demo_events == ['setup', 'startup']
+        assert Module.demo_events == ['setup', 'startup']
 
         assert space.getattr(w_demo, space.wrap('measuretime'))


More information about the pypy-commit mailing list