Skip to content

Commit 462f198

Browse files
committed
task: remove patched_names
1 parent 1840382 commit 462f198

File tree

3 files changed

+0
-26
lines changed

3 files changed

+0
-26
lines changed

mkl_random/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@
9999
is_patched,
100100
mkl_random,
101101
patch_numpy_random,
102-
patched_names,
103102
restore_numpy_random,
104103
)
105104

@@ -159,7 +158,6 @@
159158
"patch_numpy_random",
160159
"restore_numpy_random",
161160
"is_patched",
162-
"patched_names",
163161
]
164162

165163
del _init_helper

mkl_random/_patch_numpy.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,6 @@ def is_patched(self):
104104
with self._lock:
105105
return self._patch_count > 0
106106

107-
def patched_names(self):
108-
with self._lock:
109-
return list(self._restore_dict)
110-
111107

112108
_patch = _GlobalPatch()
113109

@@ -159,11 +155,6 @@ def is_patched():
159155
return _patch.is_patched()
160156

161157

162-
def patched_names():
163-
"""Return names currently patched in NumPy's random submodule."""
164-
return _patch.patched_names()
165-
166-
167158
class mkl_random(ContextDecorator):
168159
"""
169160
Context manager and decorator to temporarily patch NumPy random submodule

mkl_random/tests/test_patch.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,3 @@ def test_patch_reentrant():
103103
finally:
104104
while mkl_random.is_patched():
105105
mkl_random.restore_numpy_random()
106-
107-
108-
def test_patched_names():
109-
"""Test that patched_names() returns patched symbol names."""
110-
assert not mkl_random.is_patched()
111-
try:
112-
mkl_random.patch_numpy_random()
113-
names = mkl_random.patched_names()
114-
assert isinstance(names, list)
115-
assert len(names) > 0
116-
assert "normal" in names
117-
assert "RandomState" in names
118-
finally:
119-
while mkl_random.is_patched():
120-
mkl_random.restore_numpy_random()

0 commit comments

Comments
 (0)