@@ -269,6 +269,66 @@ def test_quantity_with_multiple_of_positive_value(self):
269269 result = evaluation_function (res , ans , params , include_test_data = True )
270270 assert result ["is_correct" ] is True
271271
272+ def test_quantity_response_less_than_answer (self ):
273+ ans = "15 Hz"
274+ res = "10 Hz"
275+ params = {
276+ "strict_syntax" : False ,
277+ "physical_quantity" : True ,
278+ "elementary functions" : True ,
279+ "criteria" : "response < answer"
280+ }
281+ result = evaluation_function (res , ans , params , include_test_data = True )
282+ assert result ["is_correct" ] is True
283+
284+ def test_quantity_response_greater_than_equal_answer (self ):
285+ ans = "5 Hz"
286+ res = "10 Hz"
287+ params = {
288+ "strict_syntax" : False ,
289+ "physical_quantity" : True ,
290+ "elementary functions" : True ,
291+ "criteria" : "response >= answer"
292+ }
293+ result = evaluation_function (res , ans , params , include_test_data = True )
294+ assert result ["is_correct" ] is True
295+
296+ def test_quantity_response_greater_than_equal_answer_equal (self ):
297+ ans = "10 Hz"
298+ res = "10 Hz"
299+ params = {
300+ "strict_syntax" : False ,
301+ "physical_quantity" : True ,
302+ "elementary functions" : True ,
303+ "criteria" : "response >= answer"
304+ }
305+ result = evaluation_function (res , ans , params , include_test_data = True )
306+ assert result ["is_correct" ] is True
307+
308+ def test_quantity_response_less_than_equal_answer (self ):
309+ ans = "15 Hz"
310+ res = "10 Hz"
311+ params = {
312+ "strict_syntax" : False ,
313+ "physical_quantity" : True ,
314+ "elementary functions" : True ,
315+ "criteria" : "response <= answer"
316+ }
317+ result = evaluation_function (res , ans , params , include_test_data = True )
318+ assert result ["is_correct" ] is True
319+
320+ def test_quantity_response_less_than_equal_answer_equal (self ):
321+ ans = "10 Hz"
322+ res = "10 Hz"
323+ params = {
324+ "strict_syntax" : False ,
325+ "physical_quantity" : True ,
326+ "elementary functions" : True ,
327+ "criteria" : "response <= answer"
328+ }
329+ result = evaluation_function (res , ans , params , include_test_data = True )
330+ assert result ["is_correct" ] is True
331+
272332 def test_radians_to_frequency (self ):
273333 ans = "2*pi*f radian/second"
274334 res = "f Hz"
0 commit comments