This commit is contained in:
Friedrich Lindenberg 2016-02-14 11:05:46 +01:00
parent 9c316ff7a6
commit 771509a05b
2 changed files with 6 additions and 6 deletions

View File

@ -10,14 +10,14 @@ env:
# - DATABASE_URL=mysql+cymysql://travis@127.0.0.1/dataset?charset=utf8 # - DATABASE_URL=mysql+cymysql://travis@127.0.0.1/dataset?charset=utf8
install: install:
- pip install -U pip wheel - pip install -U pip wheel
- pip install flake8 psycopg2 - pip install flake8 psycopg2 nose
before_script: before_script:
- sh -c "if [ '$DATABASE_URL' = 'postgresql+psycopg2://postgres@127.0.0.1/dataset' ]; then psql -c 'DROP DATABASE IF EXISTS dataset;' -U postgres; fi" - sh -c "if [ '$DATABASE_URL' = 'postgresql+psycopg2://postgres@127.0.0.1/dataset' ]; then psql -c 'DROP DATABASE IF EXISTS dataset;' -U postgres; fi"
- sh -c "if [ '$DATABASE_URL' = 'postgresql+psycopg2://postgres@127.0.0.1/dataset' ]; then psql -c 'create database dataset;' -U postgres; fi" - sh -c "if [ '$DATABASE_URL' = 'postgresql+psycopg2://postgres@127.0.0.1/dataset' ]; then psql -c 'create database dataset;' -U postgres; fi"
# - sh -c "if [ '$DATABASE_URL' = 'mysql+cymysql://travis@127.0.0.1/dataset?charset=utf8' ]; then mysql -e 'create database IF NOT EXISTS dataset DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;'; fi" # - sh -c "if [ '$DATABASE_URL' = 'mysql+cymysql://travis@127.0.0.1/dataset?charset=utf8' ]; then mysql -e 'create database IF NOT EXISTS dataset DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;'; fi"
script: script:
- flake8 --ignore=E501,E123,E124,E126,E127,E128 dataset test - flake8 --ignore=E501,E123,E124,E126,E127,E128 dataset test
- python setup.py test - nosetests
cache: cache:
directories: directories:
- $HOME/.cache/pip - $HOME/.cache/pip

View File

@ -29,11 +29,11 @@ class FreezeTestCase(unittest.TestCase):
def test_freeze(self): def test_freeze(self):
freeze(self.tbl.all(), format='csv', freeze(self.tbl.all(), format='csv',
filename='wäther.csv'.encode('utf8'), prefix=self.d) filename=u'wäther.csv'.encode('utf8'), prefix=self.d)
self.assertTrue(os.path.exists(os.path.join(self.d, 'wäther.csv'))) self.assertTrue(os.path.exists(os.path.join(self.d, u'wäther.csv')))
freeze(self.tbl.all(), format='csv', freeze(self.tbl.all(), format='csv',
filename='wäther.csv', prefix=self.d) filename=u'wäther.csv', prefix=self.d)
self.assertTrue(os.path.exists(os.path.join(self.d, 'wäther.csv'))) self.assertTrue(os.path.exists(os.path.join(self.d, u'wäther.csv')))
def test_freeze_csv(self): def test_freeze_csv(self):
freeze(self.tbl.all(), format='csv', freeze(self.tbl.all(), format='csv',