diff --git a/CHANGELOG.md b/CHANGELOG.md index a74672fe37..3174f84e8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ - Add `--fail-warned` flag to `nf-core lint` to make warnings fail ([#1593](https://github.com/nf-core/tools/pull/1593)) - Add `--fail-warned` flag to pipeline linting workflow ([#1593](https://github.com/nf-core/tools/pull/1593)) - Updated the package requirements to prevent defunct installations of nf-core ([#1620](https://github.com/nf-core/tools/pull/1620)) +- Remove dependency of the mock package and use unittest.mock instead ([#1696](https://github.com/nf-core/tools/pull/1696)) - Fix and improve broken test for Singularity container download ([#1622](https://github.com/nf-core/tools/pull/1622)) - Use [`$XDG_CACHE_HOME`](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) or `~/.cache` instead of `$XDG_CONFIG_HOME` or `~/config/` as base directory for API cache - Switch CI to use [setup-nextflow](https://github.com/nf-core/setup-nextflow) action to install Nextflow ([#1650](https://github.com/nf-core/tools/pull/1650)) diff --git a/requirements-dev.txt b/requirements-dev.txt index 37094ce491..6557d215d9 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,5 @@ pytest-datafiles pytest-cov -mock black refgenie Sphinx diff --git a/tests/test_cli.py b/tests/test_cli.py index 4bfc591407..be1c300a1a 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -3,8 +3,8 @@ """ import unittest +from unittest import mock -import mock from click.testing import CliRunner import nf_core.__main__ diff --git a/tests/test_download.py b/tests/test_download.py index c58acd6ed2..21a8e2e9a0 100644 --- a/tests/test_download.py +++ b/tests/test_download.py @@ -7,8 +7,8 @@ import shutil import tempfile import unittest +from unittest import mock -import mock import pytest import nf_core.create diff --git a/tests/test_launch.py b/tests/test_launch.py index 12e4d26e5d..f3b1d469be 100644 --- a/tests/test_launch.py +++ b/tests/test_launch.py @@ -7,8 +7,7 @@ import shutil import tempfile import unittest - -import mock +from unittest import mock import nf_core.create import nf_core.launch diff --git a/tests/test_lint.py b/tests/test_lint.py index f75840a906..b7275c8c4b 100644 --- a/tests/test_lint.py +++ b/tests/test_lint.py @@ -8,8 +8,8 @@ import subprocess import tempfile import unittest +from unittest import mock -import mock import pytest import requests import yaml diff --git a/tests/test_list.py b/tests/test_list.py index e51b8969be..f71863cbca 100644 --- a/tests/test_list.py +++ b/tests/test_list.py @@ -9,8 +9,8 @@ import unittest from datetime import datetime from pathlib import Path +from unittest import mock -import mock import pytest from rich.console import Console diff --git a/tests/test_schema.py b/tests/test_schema.py index 02bf063d8e..0dd22243c4 100644 --- a/tests/test_schema.py +++ b/tests/test_schema.py @@ -7,9 +7,9 @@ import shutil import tempfile import unittest +from unittest import mock import click -import mock import pytest import requests import yaml diff --git a/tests/test_sync.py b/tests/test_sync.py index 3d9573251b..7a6848f9cb 100644 --- a/tests/test_sync.py +++ b/tests/test_sync.py @@ -7,9 +7,9 @@ import shutil import tempfile import unittest +from unittest import mock import git -import mock import nf_core.create import nf_core.sync diff --git a/tests/test_utils.py b/tests/test_utils.py index 12180efa0b..dd972a7375 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -6,8 +6,8 @@ import shutil import tempfile import unittest +from unittest import mock -import mock import pytest import requests