following up on #92 -- rewriting tests and realizing it's not easy to test formats.show
the one unit test as written now could pass even if formats.show does not return any installed formats.
i.e. it would "pass" but actually be failing silently, because formats.show would return nothing and then we would assert that nothing is in whatever formats.show returned.
as described in #92 we could change crowsetta.formats.show to return e.g. a list of strings
the issue here is: how do we test that output is correct?
not sure what a better way would be.
The problem is that currently the plugin entry points for the package are specified in the pyproject.toml.
Might be worth thinking about other ways to specify the format plugins, e.g. a namespace package?
https://packaging.python.org/guides/creating-and-discovering-plugins/
following up on #92 -- rewriting tests and realizing it's not easy to test
formats.show
the one unit test as written now could pass even if
formats.show
does not return any installed formats. i.e. it would "pass" but actually be failing silently, becauseformats.show
would return nothing and then we wouldassert
that nothing is in whateverformats.show
returned.as described in #92 we could change
crowsetta.formats.show
to return e.g. a list of stringsthe issue here is: how do we test that output is correct?
not sure what a better way would be. The problem is that currently the plugin entry points for the package are specified in the
pyproject.toml
. Might be worth thinking about other ways to specify theformat
plugins, e.g. a namespace package? https://packaging.python.org/guides/creating-and-discovering-plugins/which would then make it more possible? to test plugins like formats dynamically, with some approach like this https://stackoverflow.com/questions/40514205/how-to-dynamically-add-and-load-entry-points