(resource)
| 1336 | return obj |
| 1337 | |
| 1338 | def requires_resource(resource): |
| 1339 | if resource == 'gui' and not _is_gui_available(): |
| 1340 | return unittest.skip(_is_gui_available.reason) |
| 1341 | if is_resource_enabled(resource): |
| 1342 | return _id |
| 1343 | else: |
| 1344 | return unittest.skip("resource {0!r} is not enabled".format(resource)) |
| 1345 | |
| 1346 | def cpython_only(test): |
| 1347 | """ |
nothing calls this directly
no test coverage detected
searching dependent graphs…