Beispiel #1
0
    def test_set_event_loop_policy(self):
        self.assertRaises(
            AssertionError, events.set_event_loop_policy, object())

        old_policy = events.get_event_loop_policy()

        policy = events.DefaultEventLoopPolicy()
        events.set_event_loop_policy(policy)
        self.assertIs(policy, events.get_event_loop_policy())
Beispiel #2
0
 def test_get_event_loop_policy(self):
     policy = events.get_event_loop_policy()
     self.assertIsInstance(policy, events.EventLoopPolicy)
     self.assertIs(policy, events.get_event_loop_policy())