summaryrefslogtreecommitdiffstats
path: root/core/TESTS
diff options
context:
space:
mode:
Diffstat (limited to 'core/TESTS')
-rw-r--r--core/TESTS/test_imports.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/TESTS/test_imports.py b/core/TESTS/test_imports.py
index 1416556..4b35422 100644
--- a/core/TESTS/test_imports.py
+++ b/core/TESTS/test_imports.py
@@ -120,6 +120,16 @@ class SubprocessTest(TestCase):
def tearDown(self):
pass
+ def test_utf8(self):
+ '''Expects that utf8 is the default encoding when opening files
+ '''
+ import sys
+ import locale
+ self.assertTrue( sys.getdefaultencoding() == "utf-8", f'{sys.getdefaultencoding()} - UTF8 error in getdefaultencoding')
+ self.assertTrue( sys.getfilesystemencoding() == "utf-8", f'{sys.getfilesystemencoding()} - UTF8 error in getfilesystemencoding')
+ self.assertTrue( locale.getdefaultlocale()[1] == "UTF-8", f'{locale.getdefaultlocale()} - UTF8 error in locale.getdefaultlocale')
+ self.assertTrue( locale.getpreferredencoding() == "UTF-8", f'{locale.getpreferredencoding()} - UTF8 error in locale.getpreferredencoding')
+
def test_installs(self):
''' Expects external software installed: cavern, survexport, git
(but not whether it actually works)