Skip to content
Myr

Updated examples to work with pypy which has a incomplete sqlite3 in 1.4. Also disable a euc-kr test that does not work on pypy

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 8569dfe · Browse files · 3 files+14 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+14 added−2 removed

  • tests:+12 added−0 removed
  • other:+2 added−2 removed

3 files+14 added−2 removed

modified:examples/flaskr/flaskr.py+1 added-1 removed
8 unmodified lines
9 :copyright: (c) 2010 by Armin Ronacher.10 :license: BSD, see LICENSE for more details.11"""12from __future__ import with_statement13import sqlite313from sqlite3 import dbapi2 as sqlite314from contextlib import closing15from flask import Flask, request, session, g, redirect, url_for, abort, \16 render_template, flash17
81 unmodified lines
modified:examples/minitwit/minitwit.py+1 added-1 removed
8 unmodified lines
9 :license: BSD, see LICENSE for more details.10"""11from __future__ import with_statement12import time13import sqlite313from sqlite3 import dbapi2 as sqlite314from hashlib import md515from datetime import datetime16from contextlib import closing17from flask import Flask, request, session, url_for, redirect, \
231 unmodified lines
modified:tests/flask_tests.py+12 added
27 unmodified lines
28sys.path.append(os.path.join(example_path, 'flaskr'))29sys.path.append(os.path.join(example_path, 'minitwit'))303132def has_encoding(name):33 try:34 import codecs35 codecs.lookup(name)36 return True37 except LookupError:38 return False394041# config keys used for the ConfigTestCase42TEST_KEY = 'foo'43SECRET_KEY = 'devkey'44
661 unmodified lines
706 rv = app.test_client().get(u'/?foo=정상처리'.encode('euc-kr'))707 assert rv.status_code == 200708 assert rv.data == u'정상처리'.encode('utf-8')709710 if not has_encoding('euc-kr'):711 test_modified_url_encoding = None712713714class TemplatingTestCase(unittest.TestCase):715716 def test_context_processing(self):717 app = flask.Flask(__name__)
692 unmodified lines