nimi-python icon indicating copy to clipboard operation
nimi-python copied to clipboard

Test code should be separate from module code

Open thejcannon opened this issue 4 years ago • 1 comments

(Copied from #1473)

Having the tests be in the same file as the source code is not something I'd expect when installing a Python module.

  • It pollutes the API of the module (attribute discovery will show a bunch of unrelated functions)
  • It can pollute the module's dependencies
  • It bloats the installed modules (more LOC to download and sift through)
  • It makes features such as pytest's conftest.py harder to use.

If you want people to be able to run tests after installation you should allow installation using an extra (like nidmm[test])

thejcannon avatar Jun 02 '20 19:06 thejcannon

#1477 should fix this issue for converters. With that, none of the "shipping" modules should have this problem. But there are other modules in helper folder, which are used during codegen, that we need to fix.

sbethur avatar Jun 03 '20 19:06 sbethur

:rocket:

thejcannon avatar May 09 '23 20:05 thejcannon