Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Side by Side Diff: third_party/logilab/logilab/astroid/brain/py2pytest.py

Issue 1920403002: [content/test/gpu] Run pylint check of gpu tests in unittest instead of PRESUBMIT (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update path to LICENSE.txt of logilab/README.chromium Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 """Astroid hooks for pytest."""
2
3 from astroid import MANAGER, register_module_extender
4 from astroid.builder import AstroidBuilder
5
6
7 def pytest_transform():
8 return AstroidBuilder(MANAGER).string_build('''
9
10 try:
11 import _pytest.mark
12 import _pytest.recwarn
13 import _pytest.runner
14 import _pytest.python
15 except ImportError:
16 pass
17 else:
18 deprecated_call = _pytest.recwarn.deprecated_call
19 exit = _pytest.runner.exit
20 fail = _pytest.runner.fail
21 fixture = _pytest.python.fixture
22 importorskip = _pytest.runner.importorskip
23 mark = _pytest.mark.MarkGenerator()
24 raises = _pytest.python.raises
25 skip = _pytest.runner.skip
26 yield_fixture = _pytest.python.yield_fixture
27
28 ''')
29
30 register_module_extender(MANAGER, 'pytest', pytest_transform)
31 register_module_extender(MANAGER, 'py.test', pytest_transform)
OLDNEW
« no previous file with comments | « third_party/logilab/logilab/astroid/brain/py2mechanize.py ('k') | third_party/logilab/logilab/astroid/brain/py2qt4.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698