From bec783a10ba98f233792a34eb80c911b98c411f1 Mon Sep 17 00:00:00 2001 From: Eric Wang Date: Fri, 22 Feb 2019 18:56:22 -0500 Subject: [PATCH] more info on test fail --- .travis.yml | 2 +- tests/registrar_test.py | 6 +++--- tox.ini | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 80a0109..28f984f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ python: install: - pip install flake8 -r requirements.txt script: - - flake8 --max-line-length=150 --exclude=venv,docs,build --ignore=F401,F403,F405 . + - flake8 . - nosetests jobs: include: diff --git a/tests/registrar_test.py b/tests/registrar_test.py index 47e5b10..b19a444 100644 --- a/tests/registrar_test.py +++ b/tests/registrar_test.py @@ -23,7 +23,7 @@ def test_department(self): cis = self.reg.department('cis') next(cis) # Should be an iterator # Should have multiple pages of items - self.assertGreater(len(list(cis)), 20) + self.assertGreater(len(list(cis)), 20, str(list(cis))) def test_course(self): cis120 = self.reg.course('cis', '120') @@ -32,8 +32,8 @@ def test_course(self): def test_search(self): cis_search = self.reg.search({'course_id': 'cis'}) cis_dept = self.reg.department('cis') - self.assertGreater(len(list(cis_dept)), 20, str(cis_dept)) - self.assertGreaterEqual(len(list(cis_search)), 20, str(cis_search)) + self.assertGreater(len(list(cis_dept)), 20, str(list(cis_dept))) + self.assertGreaterEqual(len(list(cis_search)), 20, str(list(cis_search))) def test_search_params(self): params = self.reg.search_params() diff --git a/tox.ini b/tox.ini index 4be1879..f589301 100644 --- a/tox.ini +++ b/tox.ini @@ -6,6 +6,11 @@ [tox] envlist = py27, py34 +[flake8] +max-line-length = 150 +exclude = venv,docs,build +ignore = F401,F403,F405 + [testenv] commands = nosetests [] deps =