Merge pull request #68260 from risicle/ris-colorcet-pytest-mpl-darwin-tests

pythonPackages.{colorcet,pytest-mpl}: fix & re-enable all tests on darwin
This commit is contained in:
Mario Rodas 2019-09-07 12:09:58 -05:00 committed by GitHub
commit 925501a5d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View file

@ -34,9 +34,9 @@ buildPythonPackage rec {
export HOME=$(mktemp -d)
mkdir -p $HOME/.config/matplotlib
echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
ln -s $HOME/.config/matplotlib $HOME/.matplotlib
# disable matplotlib tests on darwin, because it requires a framework build of Python
pytest ${stdenv.lib.optionalString stdenv.isDarwin "--ignore=colorcet/tests/test_matplotlib.py"} colorcet
pytest colorcet
'';
meta = with stdenv.lib; {

View file

@ -26,13 +26,11 @@ buildPythonPackage rec {
pytest
];
# disable tests on darwin, because it requires a framework build of Python
doCheck = !stdenv.isDarwin;
checkPhase = ''
export HOME=$(mktemp -d)
mkdir -p $HOME/.config/matplotlib
echo "backend: ps" > $HOME/.config/matplotlib/matplotlibrc
ln -s $HOME/.config/matplotlib $HOME/.matplotlib
pytest
'';