Skip to content

Commit 9648cfc

Browse files
kartbennordicjm
authored andcommitted
[nrf fromtree] scripts: requirements: remove dependency to mock package
mock has been available in Python standard lib since Python 3.3, remove the unnecessary dependency to `mock` pip package. Signed-off-by: Benjamin Cabé <[email protected]> (cherry picked from commit edead76)
1 parent e683d57 commit 9648cfc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+43
-46
lines changed

scripts/build/check_init_priorities_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Tests for check_init_priorities
77
"""
88

9-
import mock
9+
from unittest import mock
1010
import pathlib
1111
import unittest
1212

scripts/requirements-actions.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -653,10 +653,6 @@ mccabe==0.7.0 \
653653
--hash=sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325 \
654654
--hash=sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e
655655
# via pylint
656-
mock==5.2.0 \
657-
--hash=sha256:4e460e818629b4b173f32d08bf30d3af8123afbb8e04bb5707a1fd4799e503f0 \
658-
--hash=sha256:7ba87f72ca0e915175596069dbbcc7c75af7b5e9b9bc107ad6349ede0819982f
659-
# via -r requirements-actions.in
660656
msgpack==1.1.1 ; sys_platform != 'win32' \
661657
--hash=sha256:196a736f0526a03653d829d7d4c5500a97eea3648aebfd4b6743875f28aa2af8 \
662658
--hash=sha256:1abfc6e949b352dadf4bce0eb78023212ec5ac42f6abfd469ce91d783c149c2a \

scripts/requirements-build-test.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,5 @@ coverage
1717
pytest
1818
mypy
1919

20-
# used for mocking functions in pytest
21-
mock>=4.0.1
22-
2320
# used for JUnit XML parsing in CTest harness
2421
junitparser

scripts/tests/build_helpers/test_domains.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
Tests for domains.py classes
77
"""
88

9-
import mock
109
import os
1110
import sys
1211
from contextlib import nullcontext
12+
from unittest import mock
1313

1414
import pytest
1515

scripts/tests/twister/test_cmakecache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Tests for cmakecache.py classes' methods
77
"""
88

9-
import mock
9+
from unittest import mock
1010
import pytest
1111

1212
from contextlib import nullcontext

scripts/tests/twister/test_config_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import os
1111
import pytest
12-
import mock
12+
from unittest import mock
1313
import scl
1414

1515
from twisterlib.config_parser import TwisterConfigParser, extract_fields_from_arg_list, ConfigurationError

scripts/tests/twister/test_environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Tests for environment.py classes' methods
88
"""
99

10-
import mock
10+
from unittest import mock
1111
import os
1212
import pytest
1313
import shutil

scripts/tests/twister/test_handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"""
99

1010
import itertools
11-
import mock
11+
from unittest import mock
1212
import os
1313
import pytest
1414
import signal

scripts/tests/twister/test_hardwaremap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Tests for hardwaremap.py classes' methods
77
"""
88

9-
import mock
9+
from unittest import mock
1010
import pytest
1111
import sys
1212

scripts/tests/twister/test_harness.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"""
77
This test file contains testsuites for the Harness classes of twister
88
"""
9-
import mock
9+
from unittest import mock
1010
import sys
1111
import os
1212
import pytest

0 commit comments

Comments
 (0)