gabrielfalcao/sure

Fix tests on pypy (+enable testing on travis-ci)

domenkozar opened this issue · 3 comments

Fix tests on pypy (+enable testing on travis-ci)

:+1
I discovered this because pip uses freezegun and freezegun uses should.

One of the essential dependencies of sure is forbiddenfruit (https://github.com/clarete/forbiddenfruit). This package allows you to patch built-in objects in cpython. Thus, pypy and other python implementations won't work because the C API is not given.
Unfortunately, I haven't discovered any solution to mokey-patch like this in pypy (Do you guys know an existing one?) ... Someone has to write something like that.

Those projects which aim to be compatible with pypy should only use these syntax:

    expect(5).to.be.a(int)

@msabramo So freezegun should only use this syntax.

Also see documentation: https://github.com/gabrielfalcao/sure/blob/master/spec/getting-started.md#python-version-compatibility

I just merged #90 which brings pypy support and adds it to the test matrix, too.