Commits

Amaury Forgeot d'Arc committed e4c2a49

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

Comments (0)

Files changed (2)

pypy/module/_warnings/__init__.py

         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)
 

pypy/module/_warnings/test/test_warnings.py

 
     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):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.