def test_not_enough_resources():
 pool = make_pool(1, 1)
 with pytest.raises(exception.UserCritical):
  pool.put(FakeTarPartition(2))
 pool.join()

def test_not_enough_resources ( ) : pool = make_pool ( 1 , 1 ) with pytest . raises ( exception . UserCritical ) : pool . put ( FakeTarPartition ( 2 ) ) pool . join ( )
detect if a too-large segment can never complete .