diff --git a/dandi/conftest.py b/dandi/conftest.py index 8a791c1e7..e07338088 100644 --- a/dandi/conftest.py +++ b/dandi/conftest.py @@ -1 +1 @@ -from .tests.fixtures import * +from .tests.fixtures import * # noqa: F401, F403 diff --git a/dandi/support/tests/test_cache.py b/dandi/support/tests/test_cache.py index 5bb5c40d3..139a8c6cb 100644 --- a/dandi/support/tests/test_cache.py +++ b/dandi/support/tests/test_cache.py @@ -185,9 +185,9 @@ def func(path): # must be running during conda build which blows up paths with # _placehold_ers pytest.skip("seems to be running on conda and hitting the limits") - assert outputs[0].stdout.strip().decode() == f"Running script.py.DONE" + assert outputs[0].stdout.strip().decode() == "Running script.py.DONE" for o in outputs[1:]: - assert o.stdout.strip().decode() == f"DONE" + assert o.stdout.strip().decode() == "DONE" cache.clear() diff --git a/dandi/support/tests/test_digests.py b/dandi/support/tests/test_digests.py index 0792fa8f4..fa410e983 100644 --- a/dandi/support/tests/test_digests.py +++ b/dandi/support/tests/test_digests.py @@ -19,7 +19,9 @@ def test_digester(tmp_path): "md5": "202cb962ac59075b964b07152d234b70", "sha1": "40bd001563085fc35165329ea1ff5c5ecbdbbeef", "sha256": "a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3", - "sha512": "3c9909afec25354d551dae21590bb26e38d53f2173b8d3dc3eee4c047e7ab1c1eb8b85103e3be7ba613b31bb5c9c36214dc9f14a42fd7a2fdb84856bca5c44c2", + "sha512": "3c9909afec25354d551dae21590bb26e38d53f2173b8d3dc3eee4c047e7a" + "b1c1eb8b85103e3be7ba613b31bb5c9c36214dc9f14a42fd7a2fdb84856b" + "ca5c44c2", } f = tmp_path / "0" @@ -28,7 +30,9 @@ def test_digester(tmp_path): "md5": "93b885adfe0da089cdf634904fd59f71", "sha1": "5ba93c9db0cff93f52b521d7420e43f6eda2784f", "sha256": "6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d", - "sha512": "b8244d028981d693af7b456af8efa4cad63d282e19ff14942c246e50d9351d22704a802a71c3580b6370de4ceb293c324a8423342557d4e5c38438f0e36910ee", + "sha512": "b8244d028981d693af7b456af8efa4cad63d282e19ff14942c246e50d935" + "1d22704a802a71c3580b6370de4ceb293c324a8423342557d4e5c38438f0" + "e36910ee", } f = tmp_path / "long.txt" @@ -37,5 +41,7 @@ def test_digester(tmp_path): "md5": "81b196e3d8a1db4dd2e89faa39614396", "sha1": "5273ac6247322c3c7b4735a6d19fd4a5366e812f", "sha256": "80028815b3557e30d7cbef1d8dbc30af0ec0858eff34b960d2839fd88ad08871", - "sha512": "684d23393eee455f44c13ab00d062980937a5d040259d69c6b291c983bf635e1d405ff1dc2763e433d69b8f299b3f4da500663b813ce176a43e29ffcc31b0159", + "sha512": "684d23393eee455f44c13ab00d062980937a5d040259d69c6b291c983bf6" + "35e1d405ff1dc2763e433d69b8f299b3f4da500663b813ce176a43e29ffc" + "c31b0159", } diff --git a/dandi/tests/fixtures.py b/dandi/tests/fixtures.py index 6b9f4640d..ef46e83a9 100644 --- a/dandi/tests/fixtures.py +++ b/dandi/tests/fixtures.py @@ -18,6 +18,7 @@ lgr = get_logger() + # TODO: move into some common fixtures. We might produce a number of files # and also carry some small ones directly in git for regression testing @pytest.fixture(scope="session") diff --git a/dandi/tests/skip.py b/dandi/tests/skip.py index 9cfd959ec..93f10b8e5 100644 --- a/dandi/tests/skip.py +++ b/dandi/tests/skip.py @@ -96,7 +96,7 @@ def windows(): # return msg, missing_deps # The following code is modified from the original ReproMan source: -### BEGIN MODIFIED CODE +# ### BEGIN MODIFIED CODE def no_docker_commands(): @@ -121,7 +121,7 @@ def is_engine_running(): return "docker engine not running", not is_engine_running() -### END MODIFIED CODE +# ### END MODIFIED CODE def no_network(): diff --git a/dandi/tests/test_download.py b/dandi/tests/test_download.py index 31b9b0e46..46868af0a 100644 --- a/dandi/tests/test_download.py +++ b/dandi/tests/test_download.py @@ -47,7 +47,8 @@ def test_parse_dandi_url(): # new (v1? not yet tagged) web UI, and as it comes from a PR, # so we need to provide yet another mapping to stock girder s, a, aid = parse_dandi_url( - "https://refactor--gui-dandiarchive-org.netlify.app/#/file-browser/folder/5e9f9588b5c9745bad9f58fe" + "https://refactor--gui-dandiarchive-org.netlify.app/#/file-browser" + "/folder/5e9f9588b5c9745bad9f58fe" ) assert s == "https://girder.dandiarchive.org" assert (a, aid) == ("folder", ["5e9f9588b5c9745bad9f58fe"]) diff --git a/dandi/tests/test_organize.py b/dandi/tests/test_organize.py index 504cc8c6f..2166a8213 100644 --- a/dandi/tests/test_organize.py +++ b/dandi/tests/test_organize.py @@ -122,7 +122,7 @@ def test_organize_nwb_test_data(nwb_test_data, tmpdir, clirunner, mode): # with @map_to_click_exceptions we loose original str of message somehow # although it is shown to the user - checked. TODO - figure it out # assert "not containing all" in str(r.exc_info[1]) - assert r.exit_code != 0, f"Must have aborted since many files lack subject_id" + assert r.exit_code != 0, "Must have aborted since many files lack subject_id" assert not glob(op.join(outdir, "*")), "no files should have been populated" r = clirunner.invoke(organize, cmd + ["--invalid", "warn"]) diff --git a/dandi/tests/test_utils.py b/dandi/tests/test_utils.py index 8347521d3..1d7a77361 100644 --- a/dandi/tests/test_utils.py +++ b/dandi/tests/test_utils.py @@ -1,7 +1,6 @@ import inspect import os.path as op import time -import datetime import pytest from ..utils import ( ensure_datetime, diff --git a/setup.cfg b/setup.cfg index 25b9f50ef..a90eb73d9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -86,7 +86,6 @@ max-line-length = 100 #ignore = D100,D101,D102,D103,D104,D105,D200,D201,D202,D204,D205,D208,D209,D210,D300,D301,D400,D401,D403,E24,E121,E123,E126,E226,E266,E402,E704,E731,F821,I100,I101,I201,N802,N803,N804,N806,W503,W504,W605 ignore = E203,W503 exclude = - *test* *sphinx* dandi/externals/* */__init__.py