From e553f4bf11d44a59dc4d8eb02c8b7fbb08488fe0 Mon Sep 17 00:00:00 2001 From: mateuszz0000 Date: Wed, 10 Jun 2020 12:40:52 +0200 Subject: [PATCH] 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> --- .travis.yml | 1 + greedy_method/test_knapsack.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2c9f0f0df..c9f601144 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 . diff --git a/greedy_method/test_knapsack.py b/greedy_method/test_knapsack.py index 8f8107bc7..9d556d2d2 100644 --- a/greedy_method/test_knapsack.py +++ b/greedy_method/test_knapsack.py @@ -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__":