pystempel icon indicating copy to clipboard operation
pystempel copied to clipboard

Add tests before and after packaging

Open dzieciou opened this issue 3 years ago • 1 comments

(for instance to test access to package resources)

dzieciou avatar Mar 13 '21 11:03 dzieciou

I am not sure yet if it is easy to do:

I wouldn't test setup.py at all. It usually is very declarative by nature, and if not, it's fiendishly complex to test as it would require yo to mock away a lot of side-effect laden calls. Instead, if you have to have more complex logic in there (e.g. version extraction from a documentation-file, as I've seen the other day), extract that from setup.py, and develop/test separately. Then import and use.

From: https://stackoverflow.com/questions/28021364/how-to-test-setup-py

dzieciou avatar Mar 13 '21 13:03 dzieciou