Ejemplo n.º 1
0
 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("/"), "_")
Ejemplo n.º 2
0
 def test_filename_from_title_win32(self):
     self.assertEqual(make_filename_from_title("\\"), "_")
     self.assertEqual(make_filename_from_title(":"), "_")
Ejemplo n.º 3
0
 def filename(self):
     return make_filename_from_title(self.title, _("Unnamed Script"))