treewide: migrate to pythonPackages.unittestCheckHook

This commit is contained in:
Winter
2022-08-06 12:32:04 -04:00
parent e8fbb38a51
commit 19adc3341c
82 changed files with 278 additions and 417 deletions
@@ -9,6 +9,7 @@
, regex
, tabview
, python
, unittestCheckHook
}:
buildPythonPackage rec {
@@ -33,26 +34,29 @@ buildPythonPackage rec {
tabview
];
checkInputs = [ unittestCheckHook ];
pythonImportsCheck = [
"clevercsv"
"clevercsv.cparser"
];
checkPhase = ''
preCheck = ''
# by linking the installed version the tests also have access to compiled native libraries
rm -r clevercsv
ln -s $out/${python.sitePackages}/clevercsv/ clevercsv
# their ci only runs unit tests, there are also integration and fuzzing tests
${python.interpreter} -m unittest discover -v -f -s ./tests/test_unit
'';
# their ci only runs unit tests, there are also integration and fuzzing tests
unittestFlagsArray = [ "-v" "-f" "-s" "./tests/test_unit" ];
meta = with lib; {
description = "CleverCSV is a Python package for handling messy CSV files";
longDescription = ''
CleverCSV is a Python package for handling messy CSV files. It provides
a drop-in replacement for the builtin CSV module with improved dialect
detection, and comes with a handy command line application for working
with CSV files.
CleverCSV is a Python package for handling messy CSV files. It provides
a drop-in replacement for the builtin CSV module with improved dialect
detection, and comes with a handy command line application for working
with CSV files.
'';
homepage = "https://github.com/alan-turing-institute/CleverCSV";
changelog = "https://github.com/alan-turing-institute/CleverCSV/blob/master/CHANGELOG.md";