You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to setup CI with github/travis-ci, I noticed that the feed and post tests were occasionally failing. It comes from the order of clients, which is different between the expected and tested outputs. Clients are instantiated from a dict which loaded from the configuration file using PyYAML. Such a dict is not ordered (python<3.7).
A workaround would be to use this trick. However, the root cause of the issue comes from the test itself: it checks the standard output of feedspora instead of testing the code logic. It would be enough to check the output of each client independently (this would be required for #43 as well).
Proposed implementation: each client should be able to store entries, perhaps as list stored as an attribute. Once all clients/entries have been processed, feedspora_runner.py could check whether we were in testing mode, retrieve the list from all clients, and merge them in a JSON structure [{'client1_name': client1_list, 'client2_name': client2_list, ...} that can be later loaded. The comparison with the expected output stored in the golden file (in the same format) would have to take into account dict keys and values, instead of their string representations.
The text was updated successfully, but these errors were encountered:
While trying to setup CI with github/travis-ci, I noticed that the
feed
andpost
tests were occasionally failing. It comes from the order of clients, which is different between the expected and tested outputs. Clients are instantiated from a dict which loaded from the configuration file usingPyYAML
. Such a dict is not ordered (python<3.7).A workaround would be to use this trick. However, the root cause of the issue comes from the test itself: it checks the standard output of feedspora instead of testing the code logic. It would be enough to check the output of each client independently (this would be required for #43 as well).
Proposed implementation: each client should be able to store entries, perhaps as list stored as an attribute. Once all clients/entries have been processed,
feedspora_runner.py
could check whether we were intesting
mode, retrieve the list from all clients, and merge them in a JSON structure[{'client1_name': client1_list, 'client2_name': client2_list, ...}
that can be later loaded. The comparison with the expected output stored in the golden file (in the same format) would have to take into account dict keys and values, instead of their string representations.The text was updated successfully, but these errors were encountered: