|
|
|
@ -1,497 +0,0 @@
|
|
|
|
|
diff --git a/tests/unit/bokeh/application/test_application.py b/tests/unit/bokeh/application/test_application.py
|
|
|
|
|
index 7fa815eff..c1de92ff6 100644
|
|
|
|
|
--- a/tests/unit/bokeh/application/test_application.py
|
|
|
|
|
+++ b/tests/unit/bokeh/application/test_application.py
|
|
|
|
|
@@ -20,7 +20,7 @@ import pytest ; pytest
|
|
|
|
|
import logging
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.application.handlers import CodeHandler, FunctionHandler, Handler
|
|
|
|
|
diff --git a/tests/unit/bokeh/client/test_session__client.py b/tests/unit/bokeh/client/test_session__client.py
|
|
|
|
|
index 2157d0bea..c1f2bf261 100644
|
|
|
|
|
--- a/tests/unit/bokeh/client/test_session__client.py
|
|
|
|
|
+++ b/tests/unit/bokeh/client/test_session__client.py
|
|
|
|
|
@@ -17,7 +17,7 @@ import pytest ; pytest
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Module under test
|
|
|
|
|
import bokeh.client.session as bcs # isort:skip
|
|
|
|
|
diff --git a/tests/unit/bokeh/command/test_subcommand.py b/tests/unit/bokeh/command/test_subcommand.py
|
|
|
|
|
index 507d14541..a6442566c 100644
|
|
|
|
|
--- a/tests/unit/bokeh/command/test_subcommand.py
|
|
|
|
|
+++ b/tests/unit/bokeh/command/test_subcommand.py
|
|
|
|
|
@@ -17,7 +17,7 @@ import pytest ; pytest
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock
|
|
|
|
|
+from unittest.mock import MagicMock
|
|
|
|
|
|
|
|
|
|
# Module under test
|
|
|
|
|
import bokeh.command.subcommand as sc # isort:skip
|
|
|
|
|
diff --git a/tests/unit/bokeh/command/test_util__command.py b/tests/unit/bokeh/command/test_util__command.py
|
|
|
|
|
index ec6c72991..baa8365a3 100644
|
|
|
|
|
--- a/tests/unit/bokeh/command/test_util__command.py
|
|
|
|
|
+++ b/tests/unit/bokeh/command/test_util__command.py
|
|
|
|
|
@@ -21,7 +21,7 @@ import os
|
|
|
|
|
import tempfile
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from tests.support.util.types import Capture
|
|
|
|
|
diff --git a/tests/unit/bokeh/core/property/test_bases.py b/tests/unit/bokeh/core/property/test_bases.py
|
|
|
|
|
index 2e65191a1..cc69110f6 100644
|
|
|
|
|
--- a/tests/unit/bokeh/core/property/test_bases.py
|
|
|
|
|
+++ b/tests/unit/bokeh/core/property/test_bases.py
|
|
|
|
|
@@ -22,7 +22,7 @@ from typing import Any
|
|
|
|
|
# External imports
|
|
|
|
|
import numpy as np
|
|
|
|
|
import pandas as pd
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.core.has_props import HasProps
|
|
|
|
|
diff --git a/tests/unit/bokeh/core/property/test_descriptors.py b/tests/unit/bokeh/core/property/test_descriptors.py
|
|
|
|
|
index 2b4676064..00c279b03 100644
|
|
|
|
|
--- a/tests/unit/bokeh/core/property/test_descriptors.py
|
|
|
|
|
+++ b/tests/unit/bokeh/core/property/test_descriptors.py
|
|
|
|
|
@@ -20,7 +20,7 @@ import pytest ; pytest
|
|
|
|
|
import typing as tp
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.core.properties import Int, List, Nullable
|
|
|
|
|
diff --git a/tests/unit/bokeh/core/property/test_wrappers__property.py b/tests/unit/bokeh/core/property/test_wrappers__property.py
|
|
|
|
|
index 2202244cc..4551be8cc 100644
|
|
|
|
|
--- a/tests/unit/bokeh/core/property/test_wrappers__property.py
|
|
|
|
|
+++ b/tests/unit/bokeh/core/property/test_wrappers__property.py
|
|
|
|
|
@@ -17,7 +17,7 @@ import pytest ; pytest
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.core.properties import (
|
|
|
|
|
diff --git a/tests/unit/bokeh/core/test_validation.py b/tests/unit/bokeh/core/test_validation.py
|
|
|
|
|
index 8f2634161..02971b25b 100644
|
|
|
|
|
--- a/tests/unit/bokeh/core/test_validation.py
|
|
|
|
|
+++ b/tests/unit/bokeh/core/test_validation.py
|
|
|
|
|
@@ -20,7 +20,7 @@ import pytest ; pytest
|
|
|
|
|
from typing import Any, cast
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.core.properties import Int
|
|
|
|
|
diff --git a/tests/unit/bokeh/document/test_callbacks__document.py b/tests/unit/bokeh/document/test_callbacks__document.py
|
|
|
|
|
index a42798c9d..2790d470c 100644
|
|
|
|
|
--- a/tests/unit/bokeh/document/test_callbacks__document.py
|
|
|
|
|
+++ b/tests/unit/bokeh/document/test_callbacks__document.py
|
|
|
|
|
@@ -22,7 +22,7 @@ import logging
|
|
|
|
|
from typing import Any
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.core.enums import HoldPolicy, HoldPolicyType
|
|
|
|
|
diff --git a/tests/unit/bokeh/document/test_document.py b/tests/unit/bokeh/document/test_document.py
|
|
|
|
|
index 63072acc7..0cf36ebe9 100644
|
|
|
|
|
--- a/tests/unit/bokeh/document/test_document.py
|
|
|
|
|
+++ b/tests/unit/bokeh/document/test_document.py
|
|
|
|
|
@@ -21,7 +21,7 @@ import weakref
|
|
|
|
|
from typing import Any
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import patch
|
|
|
|
|
+from unittest.mock import patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.core.enums import HoldPolicy
|
|
|
|
|
diff --git a/tests/unit/bokeh/document/test_events__document.py b/tests/unit/bokeh/document/test_events__document.py
|
|
|
|
|
index 346a4290b..6ad971126 100644
|
|
|
|
|
--- a/tests/unit/bokeh/document/test_events__document.py
|
|
|
|
|
+++ b/tests/unit/bokeh/document/test_events__document.py
|
|
|
|
|
@@ -18,7 +18,7 @@ import pytest ; pytest
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
import pandas as pd
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.core.properties import Any, ColumnData, Instance
|
|
|
|
|
diff --git a/tests/unit/bokeh/document/test_models.py b/tests/unit/bokeh/document/test_models.py
|
|
|
|
|
index 8f21cc135..da87c39b5 100644
|
|
|
|
|
--- a/tests/unit/bokeh/document/test_models.py
|
|
|
|
|
+++ b/tests/unit/bokeh/document/test_models.py
|
|
|
|
|
@@ -20,7 +20,7 @@ import pytest ; pytest
|
|
|
|
|
import gc
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.core.types import ID
|
|
|
|
|
diff --git a/tests/unit/bokeh/embed/test_standalone.py b/tests/unit/bokeh/embed/test_standalone.py
|
|
|
|
|
index d8a7e9468..6d27d4476 100644
|
|
|
|
|
--- a/tests/unit/bokeh/embed/test_standalone.py
|
|
|
|
|
+++ b/tests/unit/bokeh/embed/test_standalone.py
|
|
|
|
|
@@ -26,7 +26,7 @@ from typing import Any
|
|
|
|
|
import bs4
|
|
|
|
|
import numpy as np
|
|
|
|
|
from jinja2 import Template
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
from selenium.webdriver.common.by import By
|
|
|
|
|
from selenium.webdriver.remote.webdriver import WebDriver
|
|
|
|
|
|
|
|
|
|
diff --git a/tests/unit/bokeh/embed/test_util__embed.py b/tests/unit/bokeh/embed/test_util__embed.py
|
|
|
|
|
index 9027bfac9..ee24a1629 100644
|
|
|
|
|
--- a/tests/unit/bokeh/embed/test_util__embed.py
|
|
|
|
|
+++ b/tests/unit/bokeh/embed/test_util__embed.py
|
|
|
|
|
@@ -20,7 +20,7 @@ import pytest ; pytest
|
|
|
|
|
import logging
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh import __version__
|
|
|
|
|
diff --git a/tests/unit/bokeh/io/test_notebook__io.py b/tests/unit/bokeh/io/test_notebook__io.py
|
|
|
|
|
index 6b28b4c2d..9a7dc84c4 100644
|
|
|
|
|
--- a/tests/unit/bokeh/io/test_notebook__io.py
|
|
|
|
|
+++ b/tests/unit/bokeh/io/test_notebook__io.py
|
|
|
|
|
@@ -21,7 +21,7 @@ import json
|
|
|
|
|
from typing import Any
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, PropertyMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, PropertyMock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.document.document import Document
|
|
|
|
|
diff --git a/tests/unit/bokeh/io/test_output.py b/tests/unit/bokeh/io/test_output.py
|
|
|
|
|
index df2d939a5..107052b9c 100644
|
|
|
|
|
--- a/tests/unit/bokeh/io/test_output.py
|
|
|
|
|
+++ b/tests/unit/bokeh/io/test_output.py
|
|
|
|
|
@@ -17,7 +17,7 @@ import pytest ; pytest
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.io.state import curstate
|
|
|
|
|
diff --git a/tests/unit/bokeh/io/test_saving.py b/tests/unit/bokeh/io/test_saving.py
|
|
|
|
|
index f657a89c3..1709d44c8 100644
|
|
|
|
|
--- a/tests/unit/bokeh/io/test_saving.py
|
|
|
|
|
+++ b/tests/unit/bokeh/io/test_saving.py
|
|
|
|
|
@@ -20,7 +20,7 @@ import pytest ; pytest
|
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.core.templates import FILE
|
|
|
|
|
diff --git a/tests/unit/bokeh/io/test_showing.py b/tests/unit/bokeh/io/test_showing.py
|
|
|
|
|
index 6c49a6d07..1e615b8c2 100644
|
|
|
|
|
--- a/tests/unit/bokeh/io/test_showing.py
|
|
|
|
|
+++ b/tests/unit/bokeh/io/test_showing.py
|
|
|
|
|
@@ -17,7 +17,7 @@ import pytest ; pytest
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, Mock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, Mock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.application.application import Application
|
|
|
|
|
diff --git a/tests/unit/bokeh/io/test_state.py b/tests/unit/bokeh/io/test_state.py
|
|
|
|
|
index 395811acc..d12f9fa74 100644
|
|
|
|
|
--- a/tests/unit/bokeh/io/test_state.py
|
|
|
|
|
+++ b/tests/unit/bokeh/io/test_state.py
|
|
|
|
|
@@ -17,7 +17,7 @@ import pytest ; pytest
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.document import Document
|
|
|
|
|
diff --git a/tests/unit/bokeh/io/test_util__io.py b/tests/unit/bokeh/io/test_util__io.py
|
|
|
|
|
index 3a4be5244..d18323294 100644
|
|
|
|
|
--- a/tests/unit/bokeh/io/test_util__io.py
|
|
|
|
|
+++ b/tests/unit/bokeh/io/test_util__io.py
|
|
|
|
|
@@ -20,7 +20,7 @@ import pytest ; pytest
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import (
|
|
|
|
|
+from unittest.mock import (
|
|
|
|
|
MagicMock,
|
|
|
|
|
Mock,
|
|
|
|
|
PropertyMock,
|
|
|
|
|
diff --git a/tests/unit/bokeh/models/test_annotations.py b/tests/unit/bokeh/models/test_annotations.py
|
|
|
|
|
index f1eef4443..57a64ede4 100644
|
|
|
|
|
--- a/tests/unit/bokeh/models/test_annotations.py
|
|
|
|
|
+++ b/tests/unit/bokeh/models/test_annotations.py
|
|
|
|
|
@@ -20,7 +20,7 @@ import pytest ; pytest
|
|
|
|
|
from datetime import datetime
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-import mock
|
|
|
|
|
+from unittest import mock
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.core.properties import field, value
|
|
|
|
|
diff --git a/tests/unit/bokeh/models/test_mappers.py b/tests/unit/bokeh/models/test_mappers.py
|
|
|
|
|
index 1273f4911..130b77a31 100644
|
|
|
|
|
--- a/tests/unit/bokeh/models/test_mappers.py
|
|
|
|
|
+++ b/tests/unit/bokeh/models/test_mappers.py
|
|
|
|
|
@@ -18,7 +18,7 @@ import pytest ; pytest
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
import pandas as pd
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.core.validation import check_integrity, process_validation_issues
|
|
|
|
|
diff --git a/tests/unit/bokeh/models/test_plots.py b/tests/unit/bokeh/models/test_plots.py
|
|
|
|
|
index 8c1a66c17..7f4024cf7 100644
|
|
|
|
|
--- a/tests/unit/bokeh/models/test_plots.py
|
|
|
|
|
+++ b/tests/unit/bokeh/models/test_plots.py
|
|
|
|
|
@@ -20,9 +20,9 @@ import pytest ; pytest
|
|
|
|
|
from math import isnan
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-import mock
|
|
|
|
|
+from unittest import mock
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
import xyzservices.providers as xyz
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.core.validation import check_integrity, process_validation_issues
|
|
|
|
|
diff --git a/tests/unit/bokeh/models/test_ranges.py b/tests/unit/bokeh/models/test_ranges.py
|
|
|
|
|
index 7c71a8453..3bf9c745b 100644
|
|
|
|
|
--- a/tests/unit/bokeh/models/test_ranges.py
|
|
|
|
|
+++ b/tests/unit/bokeh/models/test_ranges.py
|
|
|
|
|
@@ -21,7 +21,7 @@ import datetime as dt
|
|
|
|
|
from math import isnan
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-import mock
|
|
|
|
|
+from unittest import mock
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.core.validation import check_integrity, process_validation_issues
|
|
|
|
|
diff --git a/tests/unit/bokeh/plotting/test__decorators.py b/tests/unit/bokeh/plotting/test__decorators.py
|
|
|
|
|
index 5ee77137d..ea45289d7 100644
|
|
|
|
|
--- a/tests/unit/bokeh/plotting/test__decorators.py
|
|
|
|
|
+++ b/tests/unit/bokeh/plotting/test__decorators.py
|
|
|
|
|
@@ -17,7 +17,7 @@ import pytest ; pytest
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import mock
|
|
|
|
|
+from unittest import mock
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.models import CDSView, Marker
|
|
|
|
|
diff --git a/tests/unit/bokeh/plotting/test__renderer.py b/tests/unit/bokeh/plotting/test__renderer.py
|
|
|
|
|
index 271cf196f..3337c550a 100644
|
|
|
|
|
--- a/tests/unit/bokeh/plotting/test__renderer.py
|
|
|
|
|
+++ b/tests/unit/bokeh/plotting/test__renderer.py
|
|
|
|
|
@@ -19,7 +19,7 @@ import pytest ; pytest
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.models import Circle
|
|
|
|
|
|
|
|
|
|
-#from mock import mock
|
|
|
|
|
+#from unittest import mock
|
|
|
|
|
|
|
|
|
|
#from bokeh.plotting import figure
|
|
|
|
|
|
|
|
|
|
diff --git a/tests/unit/bokeh/server/test_server__server.py b/tests/unit/bokeh/server/test_server__server.py
|
|
|
|
|
index a195fe4dc..5ced4affc 100644
|
|
|
|
|
--- a/tests/unit/bokeh/server/test_server__server.py
|
|
|
|
|
+++ b/tests/unit/bokeh/server/test_server__server.py
|
|
|
|
|
@@ -26,7 +26,7 @@ import time
|
|
|
|
|
from datetime import timedelta
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-import mock
|
|
|
|
|
+from unittest import mock
|
|
|
|
|
import tornado
|
|
|
|
|
from _util_server import (
|
|
|
|
|
http_get,
|
|
|
|
|
diff --git a/tests/unit/bokeh/server/test_session__server.py b/tests/unit/bokeh/server/test_session__server.py
|
|
|
|
|
index 42804ce41..f37156342 100644
|
|
|
|
|
--- a/tests/unit/bokeh/server/test_session__server.py
|
|
|
|
|
+++ b/tests/unit/bokeh/server/test_session__server.py
|
|
|
|
|
@@ -17,7 +17,7 @@ import pytest ; pytest
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-import mock
|
|
|
|
|
+from unittest import mock
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.document import Document
|
|
|
|
|
diff --git a/tests/unit/bokeh/test___main__.py b/tests/unit/bokeh/test___main__.py
|
|
|
|
|
index 380409c30..539bb0b9b 100644
|
|
|
|
|
--- a/tests/unit/bokeh/test___main__.py
|
|
|
|
|
+++ b/tests/unit/bokeh/test___main__.py
|
|
|
|
|
@@ -17,7 +17,7 @@ import pytest ; pytest
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from tests.support.util.api import verify_all
|
|
|
|
|
diff --git a/tests/unit/bokeh/test_client_server.py b/tests/unit/bokeh/test_client_server.py
|
|
|
|
|
index 5ca089f6e..41c497281 100644
|
|
|
|
|
--- a/tests/unit/bokeh/test_client_server.py
|
|
|
|
|
+++ b/tests/unit/bokeh/test_client_server.py
|
|
|
|
|
@@ -23,7 +23,7 @@ import sys
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
from flaky import flaky
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
from tornado.httpclient import HTTPError
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
diff --git a/tests/unit/bokeh/test_layouts.py b/tests/unit/bokeh/test_layouts.py
|
|
|
|
|
index c5e620f2f..f07940bac 100644
|
|
|
|
|
--- a/tests/unit/bokeh/test_layouts.py
|
|
|
|
|
+++ b/tests/unit/bokeh/test_layouts.py
|
|
|
|
|
@@ -17,7 +17,7 @@ import pytest ; pytest
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-import mock
|
|
|
|
|
+from unittest import mock
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.core.validation import check_integrity, process_validation_issues
|
|
|
|
|
diff --git a/tests/unit/bokeh/util/test_browser.py b/tests/unit/bokeh/util/test_browser.py
|
|
|
|
|
index a9bc18773..171aba69f 100644
|
|
|
|
|
--- a/tests/unit/bokeh/util/test_browser.py
|
|
|
|
|
+++ b/tests/unit/bokeh/util/test_browser.py
|
|
|
|
|
@@ -22,7 +22,7 @@ import sys
|
|
|
|
|
import webbrowser
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from tests.support.util.env import envset
|
|
|
|
|
diff --git a/tests/unit/bokeh/util/test_compiler.py b/tests/unit/bokeh/util/test_compiler.py
|
|
|
|
|
index 03a7020ed..f8d2f0a87 100644
|
|
|
|
|
--- a/tests/unit/bokeh/util/test_compiler.py
|
|
|
|
|
+++ b/tests/unit/bokeh/util/test_compiler.py
|
|
|
|
|
@@ -21,7 +21,7 @@ import json
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Module under test
|
|
|
|
|
import bokeh.util.compiler as buc # isort:skip
|
|
|
|
|
diff --git a/tests/unit/bokeh/util/test_deprecation.py b/tests/unit/bokeh/util/test_deprecation.py
|
|
|
|
|
index 7945d1bb4..a77c16d22 100644
|
|
|
|
|
--- a/tests/unit/bokeh/util/test_deprecation.py
|
|
|
|
|
+++ b/tests/unit/bokeh/util/test_deprecation.py
|
|
|
|
|
@@ -17,7 +17,7 @@ import pytest ; pytest
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Module under test
|
|
|
|
|
import bokeh.util.deprecation as dep # isort:skip
|
|
|
|
|
diff --git a/tests/unit/bokeh/util/test_package.py b/tests/unit/bokeh/util/test_package.py
|
|
|
|
|
index 73afb7944..8010eb1db 100644
|
|
|
|
|
--- a/tests/unit/bokeh/util/test_package.py
|
|
|
|
|
+++ b/tests/unit/bokeh/util/test_package.py
|
|
|
|
|
@@ -17,7 +17,7 @@ import pytest ; pytest
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, patch
|
|
|
|
|
|
|
|
|
|
# Module under test
|
|
|
|
|
import bokeh.util.package as bup # isort:skip
|
|
|
|
|
diff --git a/tests/unit/bokeh/util/test_sampledata__util.py b/tests/unit/bokeh/util/test_sampledata__util.py
|
|
|
|
|
index 0a7892a4f..4fb9ebf16 100644
|
|
|
|
|
--- a/tests/unit/bokeh/util/test_sampledata__util.py
|
|
|
|
|
+++ b/tests/unit/bokeh/util/test_sampledata__util.py
|
|
|
|
|
@@ -17,7 +17,7 @@ import pytest ; pytest
|
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import call, patch
|
|
|
|
|
+from unittest.mock import call, patch
|
|
|
|
|
|
|
|
|
|
# Module under test
|
|
|
|
|
import bokeh.util.sampledata as bus # isort:skip
|
|
|
|
|
diff --git a/tests/unit/bokeh/util/test_token.py b/tests/unit/bokeh/util/test_token.py
|
|
|
|
|
index cd94e10b5..9fe23377b 100644
|
|
|
|
|
--- a/tests/unit/bokeh/util/test_token.py
|
|
|
|
|
+++ b/tests/unit/bokeh/util/test_token.py
|
|
|
|
|
@@ -24,7 +24,7 @@ import json
|
|
|
|
|
import random
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-from mock import MagicMock, Mock, patch
|
|
|
|
|
+from unittest.mock import MagicMock, Mock, patch
|
|
|
|
|
|
|
|
|
|
# Bokeh imports
|
|
|
|
|
from bokeh.util.token import (
|
|
|
|
|
diff --git a/tests/unit/bokeh/util/test_version.py b/tests/unit/bokeh/util/test_version.py
|
|
|
|
|
index 48667d036..bafe1ba95 100644
|
|
|
|
|
--- a/tests/unit/bokeh/util/test_version.py
|
|
|
|
|
+++ b/tests/unit/bokeh/util/test_version.py
|
|
|
|
|
@@ -20,7 +20,7 @@ import pytest ; pytest
|
|
|
|
|
import re
|
|
|
|
|
|
|
|
|
|
# External imports
|
|
|
|
|
-import mock
|
|
|
|
|
+from unittest import mock
|
|
|
|
|
|
|
|
|
|
# Module under test
|
|
|
|
|
import bokeh.util.version as buv # isort:skip
|