From 6fa41b3888310a1a454a72318a515dbf411d1758 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 20 Jul 2019 00:14:18 +0200 Subject: [PATCH 1/4] Travis: run job with strict DeprecationWarnings --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8d28ace..faef4a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,10 @@ jobs: include: - name: Python 3.7 (integration) python: "3.7" - env: TOXENV=py37-cov + env: + - TOXENV=py37-cov + # Fail on (internal) deprecation warnings. + - PYTEST_ADDOPTS="$PYTEST_ADDOPTS -Werror::DeprecationWarning -Wonce::DeprecationWarning:.*[/\\]site-packages[/\\]" git: # Check out vital.vim for test_cli_vital. submodules: true From 2c81737914ffcd066f7e6aec7d7b0438284ffc2d Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 20 Jul 2019 00:14:51 +0200 Subject: [PATCH 2/4] TEMP: single job --- .travis.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index faef4a9..42571d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,18 +19,6 @@ jobs: git: # Check out vital.vim for test_cli_vital. submodules: true - - name: Python 2.7 - python: "2.7" - env: TOXENV=py27-cov - - name: Python 3.6 - python: "3.6" - env: TOXENV=py36-cov - - name: Python 3.5 - python: "3.5" - env: TOXENV=py35-cov - - name: Python 3.4 - python: "3.4" - env: TOXENV=py34-cov install: - pip install tox From 23449bf358bda3b9aab256c4e7af1f52d0b4288f Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 20 Jul 2019 00:18:32 +0200 Subject: [PATCH 3/4] fixup! TEMP: single job --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 42571d0..183af0b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ jobs: env: - TOXENV=py37-cov # Fail on (internal) deprecation warnings. - - PYTEST_ADDOPTS="$PYTEST_ADDOPTS -Werror::DeprecationWarning -Wonce::DeprecationWarning:.*[/\\]site-packages[/\\]" + - PYTEST_ADDOPTS="$PYTEST_ADDOPTS -Werror::DeprecationWarning -Wonce::DeprecationWarning:.*[/\\](_bundles|site-packages)[/\\]" git: # Check out vital.vim for test_cli_vital. submodules: true From 02333f29f93c378c2b69b7586fe677562bcfc7f1 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 19 Jul 2019 23:01:50 +0200 Subject: [PATCH 4/4] tests: fix DeprecationWarnings --- test/acceptance/test_cli.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/test/acceptance/test_cli.py b/test/acceptance/test_cli.py index f5547b1..b58349a 100644 --- a/test/acceptance/test_cli.py +++ b/test/acceptance/test_cli.py @@ -6,15 +6,6 @@ class TestCLI(unittest.TestCase): - def assertRegex(self, string, pattern): - assertRegexpMatches = getattr(self, 'assertRegexpMatches', None) - if assertRegexpMatches: - assertRegexpMatches(string, pattern) - return - - super(TestCLI, self).assertRegex(string, pattern) - - def assertReturnedStdoutEqual(self, expected_stdout, args): got_stdout = '(no stdout)' cmd = [sys.executable, '-m', 'vint'] + args @@ -139,7 +130,7 @@ def test_exec_vint_with_color_flag(self): got_output = context_manager.exception.output - expected_output_pattern = '\\033\[' + expected_output_pattern = r'\\033\[' self.assertRegex(got_output, expected_output_pattern)