mrsonandrade / pyswarming

A research toolkit for Swarm Robotics.
https://pyswarming.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
21 stars 3 forks source link

Unit tests should check for values of resulting robot poses #3

Closed sea-bass closed 1 year ago

sea-bass commented 1 year ago

Right now, the unit tests provided in this tool do some very basic checks. For example:

    assert type(r) == np.ndarray
    assert len(r) > 0
    assert (r!=r0).all() == True

As such, these tests essentially verify that the code ran without error, data types are expected, and that the robots moved from their original positions.

However, they should really also check that the implementation of the behavior worked correctly. Let's take a repulsive behavior, for example. A valuable test would do something like this:

Please consider implementing this in the unit tests.

https://github.com/openjournals/joss-reviews/issues/5647

mrsonandrade commented 1 year ago

Great! I have implemented the point "verify that the two robots moved to the expected new poses" in the unit tests.

sea-bass commented 1 year ago

Looks great -- thanks for addressing this!