From e9aa9298f0621a49c2f7535681b95fef52aa884a Mon Sep 17 00:00:00 2001 From: Stefan Wehrmeyer Date: Fri, 29 Sep 2017 14:10:17 +0200 Subject: [PATCH] Drop unicode prefix --- test/sample_data.py | 7 +++++-- test/test_dataset.py | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/test/sample_data.py b/test/sample_data.py index d79d4c8..6af235b 100644 --- a/test/sample_data.py +++ b/test/sample_data.py @@ -1,8 +1,11 @@ # -*- encoding: utf-8 -*- +from __future__ import unicode_literals + from datetime import datetime -TEST_CITY_1 = u'B€rkeley' -TEST_CITY_2 = u'G€lway' + +TEST_CITY_1 = 'B€rkeley' +TEST_CITY_2 = 'G€lway' TEST_DATA = [ { diff --git a/test/test_dataset.py b/test/test_dataset.py index b2be9da..b95482b 100644 --- a/test/test_dataset.py +++ b/test/test_dataset.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + import os import unittest from datetime import datetime @@ -118,7 +120,7 @@ class DatabaseTestCase(unittest.TestCase): with self.db as tx: tx['weather'].insert({'date': datetime(2011, 1, 1), 'temperature': 1, - 'place': u'tmp_place'}) + 'place': 'tmp_place'}) raise ValueError() assert len(self.db['weather']) == init_length @@ -130,7 +132,7 @@ class DatabaseTestCase(unittest.TestCase): return with self.assertRaises(SQLAlchemyError): tbl = self.db['weather'] - tbl.insert({'date': True, 'temperature': 'wrong_value', 'place': u'tmp_place'}) + tbl.insert({'date': True, 'temperature': 'wrong_value', 'place': 'tmp_place'}) def test_load_table(self): tbl = self.db.load_table('weather')