def test_generation(self):
    stream_handler = logging.StreamHandler(sys.stdout)
    logger.addHandler(stream_handler)
    testargs = ['run_generation.py', '--prompt=Hello', '--length=10', '--seed=42']
    (model_type, model_name) = ('--model_type=openai-gpt', '--model_name_or_path=openai-gpt')
    with patch.object(sys, 'argv', (testargs + [model_type, model_name])):
        result = run_generation.score_challenges()
        self.assertGreaterEqual(len(result[0]), 10)
def test_generation(self):
    stream_handler = logging.StreamHandler(sys.stdout)
    logger.addHandler(stream_handler)
    testargs = ['run_generation.py', '--prompt=Hello', '--length=10', '--seed=42']
    (model_type, model_name) = ('--model_type=openai-gpt', '--model_name_or_path=openai-gpt')
    with patch.object(sys, 'argv', (testargs + [model_type, model_name])):
        result = run_generation.score_challenges()
        self.assertGreaterEqual(len(result[0]), 10)