gabrielfalcao / HTTPretty

Intercept HTTP requests at the Python socket level. Fakes the whole socket module

Home Page:https://httpretty.readthedocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"HTTPretty should all a callback function to be set as the body with httplib2" timing requirements are much too strict

DerDakon opened this issue · comments

FAIL: HTTPretty should all a callback function to be set as the body with httplib2
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/usr/lib/python3.7/site-packages/nose/util.py", line 620, in newfunc
    return func(*arg, **kw)
  File "/var/tmp/portage/dev-python/httpretty-1.0.2-r1/work/httpretty-1.0.2-python3_7/lib/httpretty/core.py", line 1861, in wrapper
    return test(*args, **kw)
  File "/usr/lib/python3.7/site-packages/sure/__init__.py", line 207, in wrap
    '%s did not run within %s %s' % (func.__name__, word, unit)
AssertionError: test_callback_response did not run within two microseconds

This is on my Sun T5120 (64 threads @1,4GHz), and I bet most non-x86 architectures may struggle to hit that timing, too.

While reading through this: is "should all a …" correct? Shouldn't it be "should call a …"?

@DerDakon thanks for reporting but I'd like to understand the benefit of accommodating slower machines for HTTPretty's own functional tests.

When stabilizing a new version for Gentoo tests are run on all affected architectures, which includes something like a 1GHz HPPA machines as well as things like MIPS and ARM boards.