Esempio n. 1
0
 def _init_playernames(self, playername):
     self.playernames.update(prefs.load_playernames())
     if not playername:
         playername = prefs.last_playername()
     self.playernames.add(playername)
     store = gtk.ListStore(gobject.TYPE_STRING)
     active_index = 0
     for index, name in enumerate(sorted(self.playernames)):
         store.append([name])
         if name == playername:
             active_index = index
     self.playername_comboboxentry.set_model(store)
     self.playername_comboboxentry.set_text_column(0)
     self.playername_comboboxentry.set_active(active_index)
Esempio n. 2
0
def test_load_playernames():
    playernames = prefs.load_playernames()
    assert playername in playernames
    assert getpass.getuser() in playernames
Esempio n. 3
0
def test_load_playernames():
    playernames = prefs.load_playernames()
    assert playername in playernames
    assert getpass.getuser() in playernames