From e7494514708cb4962c7ea5c7eefe032150ab3544 Mon Sep 17 00:00:00 2001 From: Thibault Gagnaux Date: Tue, 29 Sep 2020 13:56:46 +0200 Subject: [PATCH] python3Packages.fsspec: fix tests on darwin Disables the `test_touch` test which fails with the following assertion error on hydra darwin only: ``` tmpdir = local('/private/tmp/nix-build-python3.8-fsspec-0.8.3.drv-0/pytest-of-nixbld3/pytest-0/test_touch0') def test_touch(tmpdir): import time fn = tmpdir + "/in/file" fs = fsspec.filesystem("file", auto_mkdir=False) with pytest.raises(OSError): fs.touch(fn) fs = fsspec.filesystem("file", auto_mkdir=True) fs.touch(fn) info = fs.info(fn) time.sleep(0.2) fs.touch(fn) info2 = fs.info(fn) if not WIN: > assert info2["mtime"] > info["mtime"] E assert 1601358357.0 > 1601358357.0 fsspec/implementations/tests/test_local.py:322: AssertionError ``` --- pkgs/development/python-modules/fsspec/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/fsspec/default.nix b/pkgs/development/python-modules/fsspec/default.nix index 3f866c29121..4eac7983943 100644 --- a/pkgs/development/python-modules/fsspec/default.nix +++ b/pkgs/development/python-modules/fsspec/default.nix @@ -5,7 +5,6 @@ , pytestCheckHook , numpy , stdenv -, isPy38 }: buildPythonPackage rec { @@ -29,8 +28,9 @@ buildPythonPackage rec { # Test assumes user name is part of $HOME # AssertionError: assert 'nixbld' in '/homeless-shelter/foo/bar' "test_strip_protocol_expanduser" - ] ++ lib.optionals (stdenv.isDarwin && isPy38) [ + ] ++ lib.optionals (stdenv.isDarwin) [ "test_modified" # fails on hydra, works locally + "test_touch" # fails on hydra, works locally ]; meta = with lib; {