1- #-*- coding: iso-8859-1 -*-
21# pysqlite2/test/factory.py: tests for the various factories in pysqlite
32#
4- # Copyright (C) 2005-2007 Gerhard Häring <[email protected] > 3+ # Copyright (C) 2005-2007 Gerhard Häring <[email protected] > 54#
65# This file is part of pysqlite.
76#
@@ -235,20 +234,20 @@ def setUp(self):
235234 self .con = sqlite .connect (":memory:" )
236235
237236 def test_unicode (self ):
238- austria = "Österreich"
237+ austria = "Österreich"
239238 row = self .con .execute ("select ?" , (austria ,)).fetchone ()
240239 self .assertEqual (type (row [0 ]), str , "type of row[0] must be unicode" )
241240
242241 def test_string (self ):
243242 self .con .text_factory = bytes
244- austria = "Österreich"
243+ austria = "Österreich"
245244 row = self .con .execute ("select ?" , (austria ,)).fetchone ()
246245 self .assertEqual (type (row [0 ]), bytes , "type of row[0] must be bytes" )
247246 self .assertEqual (row [0 ], austria .encode ("utf-8" ), "column must equal original data in UTF-8" )
248247
249248 def test_custom (self ):
250249 self .con .text_factory = lambda x : str (x , "utf-8" , "ignore" )
251- austria = "Österreich"
250+ austria = "Österreich"
252251 row = self .con .execute ("select ?" , (austria ,)).fetchone ()
253252 self .assertEqual (type (row [0 ]), str , "type of row[0] must be unicode" )
254253 self .assertTrue (row [0 ].endswith ("reich" ), "column must contain original data" )
@@ -258,7 +257,7 @@ def test_optimized_unicode(self):
258257 with self .assertWarns (DeprecationWarning ) as cm :
259258 self .con .text_factory = sqlite .OptimizedUnicode
260259 self .assertIn ("factory.py" , cm .filename )
261- austria = "Österreich"
260+ austria = "Österreich"
262261 germany = "Deutchland"
263262 a_row = self .con .execute ("select ?" , (austria ,)).fetchone ()
264263 d_row = self .con .execute ("select ?" , (germany ,)).fetchone ()
0 commit comments