예제 #1
0
파일: test_utils.py 프로젝트: ruipin/picard
 def test_filename_from_title(self):
     self.assertEqual(make_filename_from_title(), _("No Title"))
     self.assertEqual(make_filename_from_title(""), _("No Title"))
     self.assertEqual(make_filename_from_title(" "), _("No Title"))
     self.assertEqual(make_filename_from_title(default="New Default"), "New Default")
     self.assertEqual(make_filename_from_title("", "New Default"), "New Default")
     self.assertEqual(make_filename_from_title("/"), "_")
예제 #2
0
 def test_filename_from_title_win32(self):
     self.assertEqual(make_filename_from_title("\\"), "_")
     self.assertEqual(make_filename_from_title(":"), "_")
예제 #3
0
 def filename(self):
     return make_filename_from_title(self.title, _("Unnamed Script"))