示例#1
0
 def test_strip_advanced_path_3_locale(self):
     l = "..\\locale"
     self.assertEqual(PathTranslator.strip_locale(l),
                      ".." + os.sep + "locale")
示例#2
0
 def test_strip_advanced_2_locale(self):
     l = "en_EN@calendar=test"
     self.assertEqual(PathTranslator.strip_locale(l), "en_EN")
示例#3
0
 def test_strip_advanced_path_2_locale(self):
     l = "..\\en_EN.UTF-8@calendar=test"
     self.assertEqual(PathTranslator.strip_locale(l),
                      ".." + os.sep + "en_EN")
示例#4
0
 def test_strip_empty_locale(self):
     l = ""
     self.assertEqual(PathTranslator.strip_locale(l), "")
示例#5
0
 def test_strip_arbitrary_locale(self):
     l = "de_DE.UTF-8"
     self.assertEqual(PathTranslator.strip_locale(l), "de_DE")
示例#6
0
 def test_strip_advanced_path_3_locale(self):
     l = "..\\locale"
     self.assertEqual(PathTranslator.strip_locale(l), ".." + os.sep + "locale")      
示例#7
0
 def test_strip_advanced_path_2_locale(self):
     l = "..\\en_EN.UTF-8@calendar=test"
     self.assertEqual(PathTranslator.strip_locale(l), ".." + os.sep + "en_EN")
示例#8
0
 def test_strip_advanced_2_locale(self):
     l = "en_EN@calendar=test"
     self.assertEqual(PathTranslator.strip_locale(l), "en_EN")
示例#9
0
 def test_strip_arbitrary_locale(self):
     l = "de_DE.UTF-8"
     self.assertEqual(PathTranslator.strip_locale(l), "de_DE")
示例#10
0
 def test_strip_empty_locale(self):
     l = ""
     self.assertEqual(PathTranslator.strip_locale(l), "")