Skip to content

Commit 37ad8fc

Browse files
committed
mark success/fail tests for test_import
1 parent 38696cf commit 37ad8fc

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

Lib/test/test_importlib/frozen/test_finder.py

+6-8
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,16 @@ def check_search_locations(self, spec):
7070
expected = [os.path.dirname(filename)]
7171
self.assertListEqual(spec.submodule_search_locations, expected)
7272

73-
# TODO: RUSTPYTHON
74-
@unittest.expectedFailure
7573
def test_package(self):
7674
spec = self.find('__phello__')
7775
self.assertIsNotNone(spec)
7876

79-
# TODO: RUSTPYTHON
80-
@unittest.expectedFailure
8177
def test_module_in_package(self):
8278
spec = self.find('__phello__.spam', ['__phello__'])
8379
self.assertIsNotNone(spec)
8480

81+
# TODO: RUSTPYTHON
82+
@unittest.expectedFailure
8583
def test_module(self):
8684
modules = [
8785
'__hello__',
@@ -124,6 +122,8 @@ def test_module(self):
124122
self.check_basic(spec, name)
125123
self.check_loader_state(spec, origname, filename)
126124

125+
# TODO: RUSTPYTHON
126+
@unittest.expectedFailure
127127
def test_package(self):
128128
packages = [
129129
'__phello__',
@@ -178,6 +178,8 @@ def test_failure(self):
178178
spec = self.find('<not real>')
179179
self.assertIsNone(spec)
180180

181+
# TODO: RUSTPYTHON
182+
@unittest.expectedFailure
181183
def test_not_using_frozen(self):
182184
finder = self.machinery.FrozenImporter
183185
with import_helper.frozen_modules(enabled=False):
@@ -210,14 +212,10 @@ def test_module(self):
210212
loader = self.find(name)
211213
self.assertTrue(hasattr(loader, 'load_module'))
212214

213-
# TODO: RUSTPYTHON
214-
@unittest.expectedFailure
215215
def test_package(self):
216216
loader = self.find('__phello__')
217217
self.assertTrue(hasattr(loader, 'load_module'))
218218

219-
# TODO: RUSTPYTHON
220-
@unittest.expectedFailure
221219
def test_module_in_package(self):
222220
loader = self.find('__phello__.spam', ['__phello__'])
223221
self.assertTrue(hasattr(loader, 'load_module'))

Lib/test/test_importlib/frozen/test_loader.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ def test_module(self):
7777
self.assertTrue(hasattr(module, '__spec__'))
7878
self.assertEqual(module.__spec__.loader_state.origname, name)
7979

80-
# TODO: RUSTPYTHON
81-
@unittest.expectedFailure
8280
def test_package(self):
8381
name = '__phello__'
8482
module, output = self.exec_module(name)
@@ -92,8 +90,6 @@ def test_package(self):
9290
self.assertEqual(output, 'Hello world!\n')
9391
self.assertEqual(module.__spec__.loader_state.origname, name)
9492

95-
# TODO: RUSTPYTHON
96-
@unittest.expectedFailure
9793
def test_lacking_parent(self):
9894
name = '__phello__.spam'
9995
with util.uncache('__phello__'):
@@ -146,6 +142,8 @@ def load_module(self, name):
146142
module.main()
147143
return module, stdout
148144

145+
# TODO: RUSTPYTHON
146+
@unittest.expectedFailure
149147
def test_module(self):
150148
module, stdout = self.load_module('__hello__')
151149
filename = resolve_stdlib_file('__hello__')
@@ -158,6 +156,8 @@ def test_module(self):
158156
self.assertEqual(getattr(module, attr, None), value)
159157
self.assertEqual(stdout.getvalue(), 'Hello world!\n')
160158

159+
# TODO: RUSTPYTHON
160+
@unittest.expectedFailure
161161
def test_package(self):
162162
module, stdout = self.load_module('__phello__')
163163
filename = resolve_stdlib_file('__phello__', ispkg=True)
@@ -175,6 +175,8 @@ def test_package(self):
175175
(attr, attr_value, value))
176176
self.assertEqual(stdout.getvalue(), 'Hello world!\n')
177177

178+
# TODO: RUSTPYTHON
179+
@unittest.expectedFailure
178180
def test_lacking_parent(self):
179181
with util.uncache('__phello__'):
180182
module, stdout = self.load_module('__phello__.spam')
@@ -248,8 +250,6 @@ def test_get_source(self):
248250
result = self.machinery.FrozenImporter.get_source('__hello__')
249251
self.assertIsNone(result)
250252

251-
# TODO: RUSTPYTHON
252-
@unittest.expectedFailure
253253
def test_is_package(self):
254254
# Should be able to tell what is a package.
255255
test_for = (('__hello__', False), ('__phello__', True),

Lib/test/test_importlib/test_threaded_import.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def test_parallel_meta_path(self):
158158
finally:
159159
sys.meta_path.remove(finder)
160160

161-
# TODO: RUSTPYTHON
161+
# TODO: RUSTPYTHON; maybe hang?
162162
@unittest.expectedFailure
163163
def test_parallel_path_hooks(self):
164164
# Here the Finder instance is only used to check concurrent calls

0 commit comments

Comments
 (0)