예제 #1
0
 def test_choose_target_folder(self):
     w = Gtk.Window()
     with with_response(Gtk.ResponseType.CANCEL):
         assert choose_target_folder(w, u"title", u"action") is None
     with with_response(Gtk.ResponseType.CANCEL):
         assert choose_target_folder(
             w, u"title", u"action", u"example") is None
예제 #2
0
 def test_choose_target_folder(self):
     w = Gtk.Window()
     with with_response(Gtk.ResponseType.CANCEL):
         assert choose_target_folder(w, u"title", u"action") is None
     with with_response(Gtk.ResponseType.CANCEL):
         assert choose_target_folder(
             w, u"title", u"action", u"example") is None
예제 #3
0
    def test_choose_filter(self):
        cf = create_chooser_filter(u"filter", ["*.txt"])
        assert isinstance(cf, Gtk.FileFilter)
        assert cf.get_name() == u"filter"

        w = Gtk.Window()
        with with_response(Gtk.ResponseType.CANCEL):
            assert choose_files(w, u"title", u"action", cf) == []
예제 #4
0
    def test_choose_filter(self):
        cf = create_chooser_filter(u"filter", ["*.txt"])
        assert isinstance(cf, Gtk.FileFilter)
        assert cf.get_name() == u"filter"

        w = Gtk.Window()
        with with_response(Gtk.ResponseType.CANCEL):
            assert choose_files(w, u"title", u"action", cf) == []
예제 #5
0
 def test_choose_folders(self):
     w = Gtk.Window()
     with with_response(Gtk.ResponseType.CANCEL):
         assert choose_folders(w, u"title", u"action") == []
예제 #6
0
 def test_choose_folders(self):
     w = Gtk.Window()
     with with_response(Gtk.ResponseType.CANCEL):
         assert choose_folders(w, u"title", u"action") == []