Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use unittest.mock instead of mock #668

Merged
merged 3 commits into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
Sphinx==3.5.4
furo==2021.4.11b34
myst-parser==0.13.7
mock==4.0.3
moto==2.0.5
sphinx-copybutton==0.3.1
3 changes: 1 addition & 2 deletions papermill/tests/test_autosave.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import tempfile
import time
import unittest

from mock import patch
from unittest.mock import patch

from . import get_notebook_path

Expand Down
3 changes: 1 addition & 2 deletions papermill/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@
import nbformat
from jupyter_client import kernelspec
import unittest
from unittest.mock import patch

import pytest
from click.testing import CliRunner

from mock import patch

from . import get_notebook_path, kernel_name
from .. import cli
from ..cli import papermill, _is_int, _is_float, _resolve_type
Expand Down
2 changes: 1 addition & 1 deletion papermill/tests/test_clientwrap.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import nbformat
import unittest

from mock import call, patch
from unittest.mock import call, patch

from . import get_notebook_path

Expand Down
2 changes: 1 addition & 1 deletion papermill/tests/test_engines.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import unittest

from abc import ABCMeta
from mock import Mock, patch, call
from unittest.mock import Mock, patch, call
from nbformat.notebooknode import NotebookNode

from . import get_notebook_path
Expand Down
6 changes: 1 addition & 5 deletions papermill/tests/test_execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@
import shutil
import tempfile
import unittest
from unittest.mock import patch

from functools import partial
from pathlib import Path

from nbformat import validate

try:
from unittest.mock import patch
except ImportError:
from mock import patch

from .. import engines
from ..log import logger
from ..iorw import load_notebook_node
Expand Down
1 change: 0 additions & 1 deletion papermill/tests/test_gcs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import unittest

from unittest.mock import patch

from ..exceptions import PapermillRateLimitException
Expand Down
1 change: 0 additions & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ google_compute_engine # Need this because boto has issues with dynamic package l
ipython>=5.0
ipywidgets
notebook
mock
moto
pytest>=4.1
pytest-cov>=2.6.1
Expand Down