Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fail hard with tracebacks if pytest-expect isn't working#360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gsnedders merged 1 commit intohtml5lib:masterfromwillkg:329-pytest-expect
Nov 21, 2017
Merged

Fail hard with tracebacks if pytest-expect isn't working#360

gsnedders merged 1 commit intohtml5lib:masterfromwillkg:329-pytest-expect
Nov 21, 2017

Conversation

willkg
Copy link
Contributor

Fixes#329

If you run pytest without pytest-expect or u-msgpack-python, then it'll show something like this:

$ pytest======================================================= test session starts ========================================================platform linux2 -- Python 2.7.13, pytest-3.2.3, py-1.4.34, pluggy-0.4.0rootdir: /home/willkg/mozilla/html5lib-python, inifile: pytest.ini******************************************************************************ERROR: Either pytest-expect or its dependency u-msgpack-python is notinstalled. Please install them both before running pytest.******************************************************************************collected 0 items / 1 errors                                                                                                        ===================================================== short test summary info ======================================================ERROR ============================================================== ERRORS ==============================================================________________________________________________________ ERROR collecting  _________________________________________________________../../.virtualenvs/html5lib/local/lib/python2.7/site-packages/py/_path/common.py:372: in visit    for x in Visitor(fil, rec, ignore, bf, sort).gen(self):../../.virtualenvs/html5lib/local/lib/python2.7/site-packages/py/_path/common.py:421: in gen    for p in self.gen(subdir):../../.virtualenvs/html5lib/local/lib/python2.7/site-packages/py/_path/common.py:411: in gen    if p.check(dir=1) and (rec is None or rec(p))])../../.virtualenvs/html5lib/local/lib/python2.7/site-packages/_pytest/main.py:728: in _recurse    ihook = self.gethookproxy(path)../../.virtualenvs/html5lib/local/lib/python2.7/site-packages/_pytest/main.py:632: in gethookproxy    my_conftestmodules = pm._getconftestmodules(fspath)../../.virtualenvs/html5lib/local/lib/python2.7/site-packages/_pytest/config.py:356: in _getconftestmodules    mod = self._importconftest(conftestpath)../../.virtualenvs/html5lib/local/lib/python2.7/site-packages/_pytest/config.py:381: in _importconftest    raise ConftestImportFailure(conftestpath, sys.exc_info())E   ConftestImportFailure: ImportError('No module named umsgpack',)E     File "/home/willkg/.virtualenvs/html5lib/local/lib/python2.7/site-packages/_pytest/assertion/rewrite.py", line 212, in load_moduleE       py.builtin.exec_(co, mod.__dict__)E     File "/home/willkg/.virtualenvs/html5lib/local/lib/python2.7/site-packages/py/_builtin.py", line 221, in exec_E       exec2(obj, globals, locals)E     File "<string>", line 7, in exec2E     File "/home/willkg/mozilla/html5lib-python/html5lib/tests/conftest.py", line 37, in <module>E       fail_if_missing_pytest_expect()E     File "/home/willkg/mozilla/html5lib-python/html5lib/tests/conftest.py", line 23, in fail_if_missing_pytest_expectE       from pytest_expect import expect  # noqaE     File "/home/willkg/.virtualenvs/html5lib/local/lib/python2.7/site-packages/_pytest/assertion/rewrite.py", line 212, in load_moduleE       py.builtin.exec_(co, mod.__dict__)E     File "/home/willkg/.virtualenvs/html5lib/local/lib/python2.7/site-packages/py/_builtin.py", line 221, in exec_E       exec2(obj, globals, locals)E     File "<string>", line 7, in exec2E     File "/home/willkg/.virtualenvs/html5lib/local/lib/python2.7/site-packages/pytest_expect/expect.py", line 18, in <module>E       import umsgpack!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!===================================================== 1 error in 0.24 seconds ======================================================

@willkgwillkg added this to the1.0 milestoneNov 9, 2017
@willkg
Copy link
ContributorAuthor

@gsnedders Does this match what you were thinking?

@gsnedders
Copy link
Member

gsnedders commentedNov 9, 2017
edited
Loading

@willkg Yes. (Feel free to ping me if I haven't reviewed this within a week.)

@gsneddersgsnedders merged commit2afc3ad intohtml5lib:masterNov 21, 2017
@willkgwillkg deleted the 329-pytest-expect branchDecember 4, 2017 14:03
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@gsneddersgsneddersgsnedders approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
1.0
Development

Successfully merging this pull request may close these issues.

2 participants
@willkg@gsnedders

[8]ページ先頭

©2009-2025 Movatter.jp