@@ -266,12 +266,25 @@ def test_add_and_update_tasks_new_task():
266266 # the update doesnt affect the representation string
267267 original_capability = Capability (os .path .join (test_dir , capability_path ))
268268 assert (len (original_capability ._data ) + len (new_tasks )) == len (capability ._data )
269- assert capability .capability_repr_class_str == original_capability .capability_repr_class_str
269+ assert (
270+ capability .capability_repr_class_str
271+ == original_capability .capability_repr_class_str
272+ )
270273 # Clean up
271274 shutil .rmtree (os .path .join (test_dir , f"copy_{ capability_path .split ('/' )[0 ]} " ))
272275
273276
274277def test_add_and_update_tasks_repr_tasks ():
278+ """
279+ Test the add_and_update_tasks method of the Capability class.
280+
281+ Test the add_and_update_tasks method of the Capability class.
282+ This test verifies that the add_and_update_tasks method correctly
283+ updates representative tasks in the capability. It checks the following:
284+ - The number of tasks in the capability is updated correctly.
285+ - The tasks are updated as expected.
286+ - The capability's representation string is updated.
287+ """
275288 capability_path = "capabilities_t2/math/math_mathematics_modeling_real_world"
276289 # Create a copy
277290 shutil .copytree (
@@ -299,6 +312,9 @@ def test_add_and_update_tasks_repr_tasks():
299312 assert capability ._data [0 ]["answer" ] == repr_tasks [0 ]["answer" ]
300313 assert capability ._data [1 ]["answer" ] == repr_tasks [1 ]["answer" ]
301314 assert capability ._data [2 ]["answer" ] == repr_tasks [2 ]["answer" ]
302- assert capability .capability_repr_class_str != original_capability .capability_repr_class_str
315+ assert (
316+ capability .capability_repr_class_str
317+ != original_capability .capability_repr_class_str
318+ )
303319 # Clean up
304320 shutil .rmtree (os .path .join (test_dir , f"copy_{ capability_path .split ('/' )[0 ]} " ))
0 commit comments