コード例 #1
0
 def test_last2(self):
     o = Object()
     o.save()
     uuid1 = o.__stp__.split(os.sep)[1]
     last(o)
     uuid2 = o.__stp__.split(os.sep)[1]
     self.assertEqual(uuid1, uuid2)
コード例 #2
0
 def test_last(self):
     o = Object()
     o.bla = "test"
     o.save()
     oo = Object()
     last(oo)
     self.assertEqual(oo.bla, "test")
コード例 #3
0
ファイル: irc.py プロジェクト: bthate67/obot
def cfg(event):
    c = Cfg()
    last(c)
    if not event.sets:
        return event.reply(fmt(c, skip=["username", "realname"]))
    edit(c, event.sets)
    c.save()
    event.reply("ok")
コード例 #4
0
ファイル: irc.py プロジェクト: bthate67/obot
 def start(self):
     last(self.cfg)
     if self.cfg.channel not in self.channels:
         self.channels.append(self.cfg.channel)
     self.stopped.clear()
     self.connected.clear()
     self.joined.clear()
     self.sock = None
     self.doconnect(self.cfg.server, self.cfg.nick, int(self.cfg.port))
     self.connected.wait()
     Handler.start(self)
     Output.start(self)
     Bus.add(self)
     if not self.keeprunning:
         launch(self.keep)
     self.wait()
コード例 #5
0
 def start(self):
     last(self.cfg)
     launch(self.server)
コード例 #6
0
 def start(self, repeat=True):
     last(Fetcher.cfg)
     last(Fetcher.seen)
     if repeat:
         repeater = Repeater(300.0, self.run)
         repeater.start()
コード例 #7
0
 def test_final(self):
     o = Object()
     o.last = "bla"
     last(o)
     self.assertEqual(o.last, "bla")