This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
from flask_failsafe import failsafe | |
@failsafe | |
def create_app(): | |
app = Flask(__name__) | |
app.config.update( | |
DEBUG=True, | |
SERVER_HOST='localhost', | |
SERVER_PORT=5001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ py.test | |
============================= test session starts ============================== | |
platform darwin -- Python 2.7.6 -- py-1.4.26 -- pytest-2.7.1 | |
rootdir: /Users/matt/Projects/jprops/.venv/jprops/src/jproperties, inifile: | |
plugins: xdist | |
collected 66 items | |
test_functional.py ........FFFFFF...F.........FFF.FFFFFFFFFF....F...F.FFFFFF.F...FFFF | |
=================================== FAILURES =================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def funcall(tuple, ~'[]', [index]) | |
if index < 0 | |
index = index + tuple.size() | |
erlang::element(index + 1, tuple) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module("Observing global vs. local properties ", { | |
setup: function() { | |
objectA = SC.Object.create({ | |
calledLocalObserver: false, | |
calledGlobalObserver: false, | |
calledMixedObserver: false, | |
locallyObservedProperty: 'beingWatched', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2010-05-12 05:28:36 [1092] [INFO] Listening at: unix:/mnt/application/mopho-v5/run/gunicorn.sock | |
2010-05-12 05:28:36 [1097] [INFO] Worker spawned (pid: 1097) | |
2010-05-12 05:28:36 [1098] [INFO] Worker spawned (pid: 1098) | |
2010-05-12 05:28:36 [1098] [ERROR] Unexpected error in acceptor. Sepuku. | |
Traceback (most recent call last): | |
File "/mnt/application/mopho-v5/src/gunicorn/gunicorn/workers/geventlet.py", line 59, in acceptor | |
conn, addr = self.socket.accept() | |
File "/mnt/application/mopho-v5/lib/python2.6/site-packages/eventlet/greenio.py", line 161, in accept | |
timeout_exc=socket.timeout("timed out")) | |
File "/mnt/application/mopho-v5/lib/python2.6/site-packages/eventlet/hubs/__init__.py", line 118, in trampoline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dalton | |
dalton.inject() | |
from httplib import HTTPConnection | |
recorder = dalton.Recorder(caller=HTTPConnection('www.google.com')) | |
def test(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Script(Interface): | |
def __init__(self, name, path=None): | |
self.name = name | |
self.path = path | |
def get_hash(self): | |
return [self.name] | |
def serialize(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python simpleapp.py | |
* Running on http://127.0.0.1:5000/ | |
* Restarting with reloader | |
127.0.0.1 - - [21/Aug/2012 17:29:54] "GET / HTTP/1.1" 200 - | |
127.0.0.1 - - [21/Aug/2012 17:29:54] "GET /favicon.ico HTTP/1.1" 404 - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fails on Python 2.6 with http: | |
$ python2.6 releases.py http | |
Traceback (most recent call last): | |
File "releases.py", line 5, in <module> | |
print xmlrpclib.ServerProxy('%s://pypi.python.org/pypi' % protocol).package_releases('roundup') | |
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1199, in __call__ | |
return self.__send(self.__name, args) | |
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 1489, in __request | |
verbose=self.__verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
====================================================================== | |
FAIL: HTTPretty should support rotating responses with requests | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/Users/mgood/Projects/HTTPretty/.tox/py27/lib/python2.7/site-packages/nose/case.py", line 197, in runTest | |
self.test(*self.arg) | |
File "/Users/mgood/Projects/HTTPretty/.tox/py27/lib/python2.7/site-packages/nose/util.py", line 622, in newfunc | |
return func(*arg, **kw) | |
File "/Users/mgood/Projects/HTTPretty/httpretty/core.py", line 829, in wrapper | |
return test(*args, **kw) |
OlderNewer