Added travis notifications only on fail (#2091)

* Added travis notifications only on fail

* fixup! Format Python code with psf/black push

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
mateuszz0000 2020-06-10 12:40:52 +02:00 committed by GitHub
parent 7be3d0f667
commit e553f4bf11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -7,6 +7,7 @@ before_install: pip install --upgrade pip setuptools six
install: pip install black flake8
notifications:
webhooks: https://www.travisbuddy.com/
on_success: never
before_script:
- black --check . || true
- flake8 --ignore=E203,W503 --max-complexity=25 --max-line-length=120 --statistics --count .

View File

@ -67,7 +67,9 @@ class TestClass(unittest.TestCase):
# profit = [10, 20, 30, 40, 50]
# weight = [2, 4, 6, 8, 10, 12]
# max_weight = 100
self.assertRaisesRegex(IndexError, "The length of profit and weight must be same.")
self.assertRaisesRegex(
IndexError, "The length of profit and weight must be same."
)
if __name__ == "__main__":