Пример #1
0
 def testDir(self):
     ref = get_session_defaults().keys()
     self.assertEquals(frozenset(session._dir()), frozenset(ref))
     session.x_info = "more info"
     self.assertEquals(frozenset(session._dir()),
                       frozenset(ref + ["x_info",]))
     del session.x_info
     self.assertEquals(frozenset(session._dir()), frozenset(ref))
Пример #2
0
 def testMultipleThreadUndefined(self):
     e = Event()
     check = []
     def doit():
         session.x_info = "more info"
         e.set(); e.wait()
         check.append("x_info" in session._dir())
         e.set()
     Thread(target=doit).start()
     e.wait()
     check.append("x_info" in session._dir())
     self.assertEquals(check, [True, False,])
Пример #3
0
 def doit():
     session.x_info = "more info"
     e.set(); e.wait()
     check.append("x_info" in session._dir())
     e.set()