예제 #1
0
 def test_submit_raises_notimplemented(self):
     with pytest.raises(NotImplementedError):
         Executor().submit(lambda: 1)
예제 #2
0
 def test_map_raises_notimplemented(self):
     with pytest.raises(NotImplementedError):
         Executor().map(lambda: 1)
예제 #3
0
 def test_is_pickleable_after_start(self):
     e = Executor()
     with e.start():
         post = cloudpickle.loads(cloudpickle.dumps(e))
         assert isinstance(post, Executor)
예제 #4
0
 def test_is_pickleable(self):
     e = Executor()
     post = cloudpickle.loads(cloudpickle.dumps(e))
     assert isinstance(post, Executor)
예제 #5
0
 def test_start_doesnt_do_anything(self):
     with Executor().start():
         assert True
예제 #6
0
 def test_wait_raises_notimplemented(self):
     with pytest.raises(NotImplementedError):
         Executor().wait([1])
예제 #7
0
 def test_queue_raises_notimplemented(self):
     with pytest.raises(NotImplementedError):
         Executor().queue(2)