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