Packaging/Python: Difference between revisions

imported>Milahu
add section: Testing via this command is deprecated
imported>Milahu
fix: python -m unittest
Line 234: Line 234:
</blockquote>
</blockquote>


quick fix:
quick fix: run tests with python's [https://docs.python.org/3/library/unittest.html unittest] module


<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
   checkPhase = ''
   checkPhase = ''
     runHook preCheck
     runHook preCheck
     ${python.interpreter} -m unittest discover
     ${python.interpreter} -m unittest
     runHook postCheck
     runHook postCheck
   '';
   '';