FabLabKasse icon indicating copy to clipboard operation
FabLabKasse copied to clipboard

move tests into own files

Open patkan opened this issue 10 years ago • 5 comments

Hi, I would like to move all tests in separate files in their respective directories. The way we are doing it currently seems to be problematic since we try to execute all files but only some include tests. Moreover this would be cleaner: we could separate the includes and code for tests and real logic. If no one opposes until tonight, I will start separating the tests.

patkan avatar Oct 23 '15 07:10 patkan

@fau-fablab/kasse please have a look at this issue.

patkan avatar Oct 23 '15 07:10 patkan

Even if my contribution to kasse was not that much, I think this would be a good idea...

sedrubal avatar Oct 23 '15 08:10 sedrubal

no, we don't execute all files. all files must be importable, and all unittest.testcase subclasses are run.

mgmax avatar Oct 23 '15 19:10 mgmax

Ok, you are right, my bad. We search every source file, while typical test systems assume that tests reside in certain files (e.g. test_*.py) The background for this that I try to get nearer to the de-facto-standards. Currently, Travis is failing while building the unit test. I don't think this will fix the problem with Travis, but maybe it makes it easier to find errors.

patkan avatar Oct 23 '15 19:10 patkan

I drop this task for now because I do not have the time at the moment.

patkan avatar Nov 17 '15 22:11 patkan