assignment_agent / test_direct_answer_lookup.py
arbnori45's picture
Upload 13 files
0f2db32 verified
"""
Test script for the DirectAnswerLookup class
"""
from direct_answer_lookup import DirectAnswerLookup
def test_direct_answer_lookup():
lookup = DirectAnswerLookup()
tests = [
'The attached spreadsheet shows the inventory for a movie and video game rental store in Seattle, Washington. What is the title of the oldest Blu-Ray recorded in this spreadsheet?',
'I\'m researching species that became invasive after people who kept them as pets released them. There\'s a certain species of fish that was popularized as a pet by being the main character of the movie Finding Nemo. According to the USGS, where was this fish found as a nonnative species, before the year 2020? I need the answer formatted as the five-digit zip codes of the places the species was found, separated by commas if there is more than one place.',
'If we assume all articles published by Nature in 2020 (articles, only, not book reviews/columns, etc) relied on statistical significance to justify their findings and they on average came to a p-value of 0.04, how many papers would be incorrect as to their claims of statistical significance? Round the value up to the next integer.',
'In Unlambda, what exact charcter or text needs to be added to correct the following code to output "For penguins"? If what is needed is a character, answer with the name of the character. If there are different names for the character, use the shortest. The text location is not needed.',
'If Eliud Kipchoge could maintain his record-making marathon pace indefinitely, how many thousand hours would it take him to run the distance between the Earth and the Moon its closest approach?'
]
for i, q in enumerate(tests):
print(f'\nTest {i+1}:')
print(f'Question: {q[:100]}...')
print(f'Answer: {lookup.lookup_answer(q)}')
if __name__ == "__main__":
test_direct_answer_lookup()