[Zope3-checkins] CVS: Zope3/src/zope/app/applicationcontrol/tests - test_runtimeinfo.py:1.9

Dmitry Vasiliev dima at hlabs.spb.ru
Wed Mar 24 06:13:15 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/applicationcontrol/tests
In directory cvs.zope.org:/tmp/cvs-serv22226/tests

Modified Files:
	test_runtimeinfo.py 
Log Message:
RuntimeInfo changes:

- new method: getFileSystemEncoding()
- getPythonPath() now returns unicode strings


=== Zope3/src/zope/app/applicationcontrol/tests/test_runtimeinfo.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/applicationcontrol/tests/test_runtimeinfo.py:1.8	Tue Mar 23 08:35:09 2004
+++ Zope3/src/zope/app/applicationcontrol/tests/test_runtimeinfo.py	Wed Mar 24 06:13:15 2004
@@ -49,9 +49,15 @@
 
     def _getPreferredEncoding(self):
         if locale is None:
-            return "Latin1"
+            return sys.getdefaultencoding()
         return locale.getpreferredencoding()
 
+    def _getFileSystemEncoding(self):
+        enc = sys.getfilesystemencoding()
+        if enc is None:
+            enc = self._getPreferredEncoding()
+        return enc
+
     def testIRuntimeInfoVerify(self):
         verifyObject(IRuntimeInfo, self._Test__new())
 
@@ -59,6 +65,11 @@
         runtime_info = self._Test__new()
         enc = self._getPreferredEncoding()
         self.assertEqual(runtime_info.getPreferredEncoding(), enc)
+
+    def test_FileSystemEncoding(self):
+        runtime_info = self._Test__new()
+        enc = self._getFileSystemEncoding()
+        self.assertEqual(runtime_info.getFileSystemEncoding(), enc)
 
     def test_ZopeVersion(self):
         runtime_info = self._Test__new()




More information about the Zope3-Checkins mailing list