openearth / aeolis-python

A process-based model for simulating supply-limited aeolian sediment transport
http://aeolis.readthedocs.io/
GNU General Public License v3.0
34 stars 26 forks source link

Incorrect file paths causing test_parse_callback_from_module() to fail #221

Closed niketagrawal closed 2 months ago

niketagrawal commented 2 months ago
def test_parse_callback_from_module(self):
        """Test if the callback function can be loaded from a file"""
        runner = AeoLiSRunner("aeolis.txt")
        callback = runner.parse_callback("callback_example.py:mock_callback")
        assert callable(callback)
        assert callback.__name__ == "mock_callback"
        assert callback() == True

Correct file paths are aeolis/tests/aeolis.txt and aeolis/tests/callback_example.py:mock_callback

This issue arises from an accidental change in test_model.py introduced in commit b63a8f0