what_is_formatfloat.py 345 B

1234567891011121314
  1. from evaluator import *
  2. DESCRIPTION = "This test case checks if models can format f strings with floats."
  3. TAGS = ['explain', 'python']
  4. question = """
  5. Python format {sdf} to 3 decimal digits
  6. """
  7. TestWhatIsFloatFormat = question >> LLMRun() >> SubstringEvaluator(":.3f}")
  8. if __name__ == "__main__":
  9. print(run_test(TestWhatIsFloatFormat))