[PATCH 1 of 5 V4] testing: generate tests operations using Hypothesis

David MacIver david at drmaciver.com
Thu Feb 25 12:45:31 EST 2016


Interesting. Old version of pip perhaps that doesn't understand the version
conditional dependencies?

At any rate, installing enum34 should fix the problem, I'm just surprised
it didn't happen automatically. I'll add a note about that in the comments.

On 25 February 2016 at 17:43, Martin von Zweigbergk <martinvonz at google.com>
wrote:

> On Thu, Feb 25, 2016 at 9:42 AM, David MacIver <david at drmaciver.com>
> wrote:
> > Curious that it's not installing automatically. It's supposed to. Are you
> > running on 2.6 by any chance? If so, that's not going to work.
>
> $ python --version
> Python 2.7.6
>
>
> >
> > On 25 February 2016 at 17:30, Martin von Zweigbergk <
> martinvonz at google.com>
> > wrote:
> >>
> >> On Thu, Feb 25, 2016 at 9:23 AM, Augie Fackler <raf at durin42.com> wrote:
> >> > On Thu, Feb 25, 2016 at 08:55:32AM -0800, Martin von Zweigbergk wrote:
> >> >> On Thu, Feb 25, 2016 at 2:44 AM, David MacIver <david at drmaciver.com>
> >> >> wrote:
> >> >> > On 24 February 2016 at 21:16, Martin von Zweigbergk
> >> >> > <martinvonz at google.com>
> >> >> > wrote:
> >> >> >>
> >> >> >> When running this test case, I get the following error (not
> >> >> >> surprisingly).
> >> >> >>
> >> >> >> +Traceback (most recent call last):
> >> >> >> +  File "~/hg/tests/test-verify-repo-operations.py", line 18, in
> >> >> >> <module>
> >> >> >> +    from hypothesis.extra.datetime import datetimes
> >> >> >> +ImportError: No module named hypothesis.extra.datetime
> >> >> >>
> >> >> >> I guess we should skip the test if Hypothesis is not installed,
> just
> >> >> >> like we do with e.g. test-convert-bzr-*.t.
> >> >> >>
> >> >> >
> >> >> > OK, I'll add something to do that.
> >> >> >
> >> >> >>
> >> >> >> Also, for people like me who don't know much about the Python
> >> >> >> ecosystem, how do I even install Hypothesis? Do I follow the
> >> >> >> instructions on
> >> >> >>
> >> >> >>
> http://python-packaging-user-guide.readthedocs.org/en/latest/installing/?
> >> >> >
> >> >> >
> >> >> > Yes. Just run "pip install hypothesis"
> >> >>
> >> >> After installing hypothesis and pytz, I get the following error.
> IIUC,
> >> >> that's some Python 3 module...
> >> >
> >> > It's in the stdlib in Python 3.4 (I think), but there's a backport on
> >> > pypi that you can install for 2.7.
> >>
> >> Yup, "enum34" seems to be the name.
> >>
> >> >
> >> >>
> >> >> +Traceback (most recent call last):
> >> >> +  File "~/hg/tests/test-verify-repo-operations.py", line 30, in
> >> >> <module>
> >> >> +    from hypothesis.stateful import (
> >> >> +  File
> >> >> "/usr/local/lib/python2.7/dist-packages/hypothesis/stateful.py",
> >> >> line 44, in <module>
> >> >> +    from hypothesis.internal.conjecture.data import StopTest
> >> >> +  File
> >> >>
> "/usr/local/lib/python2.7/dist-packages/hypothesis/internal/conjecture/data.py",
> >> >> line 19, in <module>
> >> >> +    from enum import IntEnum
> >> >> +ImportError: No module named enum
> >> >>
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20160225/7161b76e/attachment.html>


More information about the Mercurial-devel mailing list