File tree Expand file tree Collapse file tree 3 files changed +0
-26
lines changed
Expand file tree Collapse file tree 3 files changed +0
-26
lines changed Original file line number Diff line number Diff line change 9999 is_patched ,
100100 mkl_random ,
101101 patch_numpy_random ,
102- patched_names ,
103102 restore_numpy_random ,
104103)
105104
159158 "patch_numpy_random" ,
160159 "restore_numpy_random" ,
161160 "is_patched" ,
162- "patched_names" ,
163161]
164162
165163del _init_helper
Original file line number Diff line number Diff 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-
167158class mkl_random (ContextDecorator ):
168159 """
169160 Context manager and decorator to temporarily patch NumPy random submodule
Original file line number Diff line number Diff 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 ()
You can’t perform that action at this time.
0 commit comments