This file contains hidden or 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
diff -r 61ba052831fa _test_mlk.py | |
--- a/_test_mlk.py Mon Mar 14 15:21:45 2011 -0400 | |
+++ b/_test_mlk.py Mon Mar 14 16:44:25 2011 -0400 | |
@@ -13,12 +13,12 @@ | |
from mext.test_suite import TestSuite | |
suite = TestSuite('tests', coverage=True, pkg='webob') | |
-doctests = ['test_dec', 'test_request', 'test_response'] | |
-doctests += map('../docs/'.__add__, ['do-it-yourself', 'file-example', 'index', 'reference']) | |
-map(suite.add_doctest, doctests) |
This file contains hidden or 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 logging | |
import os.path as path | |
from paste.script.command import Command, BadCommand | |
from paste.deploy import loadapp | |
from pyramid.threadlocal import manager as threadlocal_manager |
This file contains hidden or 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
/* In place redirect using location.replace() | |
* | |
* Call redirect.redirect() with same arguments as $location.update() | |
* Call redirect.redirectHash() with same arguments as $location.updateHash() | |
* | |
* $route.otherwise({redirectTo: function() { | |
* return redirect.redirectHash(...) }}); | |
* | |
* Disuse after Vojta's $location replace is merged (0.10.1+). | |
*/ |
This file contains hidden or 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
#!/usr/bin/env python | |
import optparse | |
import urllib | |
import urllib2 | |
import urlparse | |
import xml.etree.ElementTree as ET |
This file contains hidden or 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
function setupEventually() { | |
// expect(promise).eventually.toEqual(...) | |
// uses Q.when() | |
// how to specify errbacks? override eventually.toThrow? | |
// specs to write: | |
// it('should resolve promises') | |
// it('should timeout') | |
// it('should propagate errors') | |
// it('should proxy other matchers') | |
// it('should proxy other matchers defined later') |
This file contains hidden or 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 sqlalchemy import ( | |
create_engine, | |
MetaData, | |
Table, | |
Column, | |
ForeignKey, | |
Integer, | |
Text) | |
This file contains hidden or 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 Tuple(Dictifier): | |
def __init__(self, ordered_field_types): | |
super(Tuple, self).__init__() | |
self.ordered_field_types = tuple(ordered_field_types) | |
def dictify(self, value, **kw): | |
if value is None: | |
return None | |
try: |
This file contains hidden or 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 os.path | |
import yaml | |
class Loader(yaml.SafeLoader): | |
pass | |
def construct_include(loader, node): | |
'''Evaluate contents of another yaml file, optionally selecting part of it. |
This file contains hidden or 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
# encoding: utf8 | |
import json | |
from collections import OrderedDict | |
import dfiance | |
from dfiance.graph import TypeGraphNode | |
from rubedo.document import ( | |
Document, | |
DocRef, | |
) |