[pypy-commit] pypy py3k: Test the test with -A, fix it, then fix the implementation.

amauryfa noreply at buildbot.pypy.org
Fri Nov 30 00:12:02 CET 2012


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r59141:e4c2a49ccf41
Date: 2012-11-30 00:11 +0100
http://bitbucket.org/pypy/pypy/changeset/e4c2a49ccf41/

Log:	Test the test with -A, fix it, then fix the implementation.

diff --git a/pypy/module/_warnings/__init__.py b/pypy/module/_warnings/__init__.py
--- a/pypy/module/_warnings/__init__.py
+++ b/pypy/module/_warnings/__init__.py
@@ -16,6 +16,6 @@
         from pypy.module._warnings.interp_warnings import State
         state = self.space.fromcache(State)
         self.setdictvalue(self.space, "filters", state.w_filters)
-        self.setdictvalue(self.space, "once_registry", state.w_once_registry)
-        self.setdictvalue(self.space, "default_action", state.w_default_action)
+        self.setdictvalue(self.space, "_onceregistry", state.w_once_registry)
+        self.setdictvalue(self.space, "_defaultaction", state.w_default_action)
 
diff --git a/pypy/module/_warnings/test/test_warnings.py b/pypy/module/_warnings/test/test_warnings.py
--- a/pypy/module/_warnings/test/test_warnings.py
+++ b/pypy/module/_warnings/test/test_warnings.py
@@ -3,8 +3,8 @@
 
     def test_defaults(self):
         import _warnings
-        assert _warnings.once_registry == {}
-        assert _warnings.default_action == 'default'
+        assert _warnings._onceregistry == {}
+        assert _warnings._defaultaction == 'default'
         assert "PendingDeprecationWarning" in str(_warnings.filters)
 
     def test_warn(self):


More information about the pypy-commit mailing list