10
10
import importlib .util
11
11
import importlib
12
12
from test .support .script_helper import assert_python_failure
13
+ from test .support import impl_detail
13
14
14
15
class LoaderTests (abc .LoaderTests ):
15
16
@@ -103,6 +104,7 @@ def setUp(self):
103
104
# Handling failure on reload is the up to the module.
104
105
test_state_after_failure = None
105
106
107
+ @impl_detail ("GR-26524 arrity error" , graalvm = False )
106
108
def test_module (self ):
107
109
'''Test loading an extension module'''
108
110
with util .uncache (self .name ):
@@ -117,6 +119,7 @@ def test_module(self):
117
119
self .assertIsInstance (module .__loader__ ,
118
120
self .machinery .ExtensionFileLoader )
119
121
122
+ @impl_detail ("GR-26524 arrity error" , graalvm = False )
120
123
def test_functionality (self ):
121
124
'''Test basic functionality of stuff defined in an extension module'''
122
125
with util .uncache (self .name ):
@@ -137,6 +140,7 @@ def test_functionality(self):
137
140
self .assertEqual (module .int_const , 1969 )
138
141
self .assertEqual (module .str_const , 'something different' )
139
142
143
+ @impl_detail ("GR-26524 arrity error" , graalvm = False )
140
144
def test_reload (self ):
141
145
'''Test that reload didn't re-set the module's attributes'''
142
146
with util .uncache (self .name ):
@@ -145,6 +149,7 @@ def test_reload(self):
145
149
importlib .reload (module )
146
150
self .assertIs (ex_class , module .Example )
147
151
152
+ @impl_detail ("GR-26524 arrity error" , graalvm = False )
148
153
def test_try_registration (self ):
149
154
'''Assert that the PyState_{Find,Add,Remove}Module C API doesn't work'''
150
155
module = self .load_module ()
@@ -170,13 +175,15 @@ def load_module_by_name(self, fullname):
170
175
loader .exec_module (module )
171
176
return module
172
177
178
+ @impl_detail ("GR-26524 arrity error" , graalvm = False )
173
179
def test_load_submodule (self ):
174
180
'''Test loading a simulated submodule'''
175
181
module = self .load_module_by_name ('pkg.' + self .name )
176
182
self .assertIsInstance (module , types .ModuleType )
177
183
self .assertEqual (module .__name__ , 'pkg.' + self .name )
178
184
self .assertEqual (module .str_const , 'something different' )
179
185
186
+ @impl_detail ("GR-26524 arrity error" , graalvm = False )
180
187
def test_load_short_name (self ):
181
188
'''Test loading module with a one-character name'''
182
189
module = self .load_module_by_name ('x' )
@@ -185,6 +192,7 @@ def test_load_short_name(self):
185
192
self .assertEqual (module .str_const , 'something different' )
186
193
self .assertNotIn ('x' , sys .modules )
187
194
195
+ @impl_detail ("GR-26524 arrity error" , graalvm = False )
188
196
def test_load_twice (self ):
189
197
'''Test that 2 loads result in 2 module objects'''
190
198
module1 = self .load_module_by_name (self .name )
@@ -205,6 +213,7 @@ def test_unloadable_nonascii(self):
205
213
self .load_module_by_name (name )
206
214
self .assertEqual (cm .exception .name , name )
207
215
216
+ @impl_detail ("GR-26524 arrity error" , graalvm = False )
208
217
def test_nonmodule (self ):
209
218
'''Test returning a non-module object from create works'''
210
219
name = self .name + '_nonmodule'
@@ -213,6 +222,7 @@ def test_nonmodule(self):
213
222
self .assertEqual (mod .three , 3 )
214
223
215
224
# issue 27782
225
+ @impl_detail ("GR-26524 arrity error" , graalvm = False )
216
226
def test_nonmodule_with_methods (self ):
217
227
'''Test creating a non-module object with methods defined'''
218
228
name = self .name + '_nonmodule_with_methods'
@@ -221,13 +231,15 @@ def test_nonmodule_with_methods(self):
221
231
self .assertEqual (mod .three , 3 )
222
232
self .assertEqual (mod .bar (10 , 1 ), 9 )
223
233
234
+ @impl_detail ("GR-26524 arrity error" , graalvm = False )
224
235
def test_null_slots (self ):
225
236
'''Test that NULL slots aren't a problem'''
226
237
name = self .name + '_null_slots'
227
238
module = self .load_module_by_name (name )
228
239
self .assertIsInstance (module , types .ModuleType )
229
240
self .assertEqual (module .__name__ , name )
230
241
242
+ @impl_detail ("GR-26524 arrity error" , graalvm = False )
231
243
def test_bad_modules (self ):
232
244
'''Test SystemError is raised for misbehaving extensions'''
233
245
for name_base in [
@@ -252,6 +264,7 @@ def test_bad_modules(self):
252
264
with self .assertRaises (SystemError ):
253
265
self .load_module_by_name (name )
254
266
267
+ @impl_detail ("GR-26524 arrity error" , graalvm = False )
255
268
def test_nonascii (self ):
256
269
'''Test that modules with non-ASCII names can be loaded'''
257
270
# punycode behaves slightly differently in some-ASCII and no-ASCII
0 commit comments