Debian: Package 1.10.0-1
parent
2c3097ca78
commit
542b6738a6
@ -1,44 +0,0 @@
|
|||||||
Description: use python3 instead of python in tests
|
|
||||||
On Debian systems python is still python2, so use python3 explicitely instead
|
|
||||||
Author: Philipp Huebner <debalance@debian.org>
|
|
||||||
|
|
||||||
Index: yamllint/tests/test_module.py
|
|
||||||
===================================================================
|
|
||||||
--- yamllint.orig/tests/test_module.py
|
|
||||||
+++ yamllint/tests/test_module.py
|
|
||||||
@@ -46,7 +46,7 @@ class ModuleTestCase(unittest.TestCase):
|
|
||||||
|
|
||||||
def test_run_module_no_args(self):
|
|
||||||
with self.assertRaises(subprocess.CalledProcessError) as ctx:
|
|
||||||
- subprocess.check_output(['python', '-m', 'yamllint'],
|
|
||||||
+ subprocess.check_output(['python3', '-m', 'yamllint'],
|
|
||||||
stderr=subprocess.STDOUT)
|
|
||||||
self.assertEqual(ctx.exception.returncode, 2)
|
|
||||||
self.assertRegexpMatches(ctx.exception.output.decode(),
|
|
||||||
@@ -54,7 +54,7 @@ class ModuleTestCase(unittest.TestCase):
|
|
||||||
|
|
||||||
def test_run_module_on_bad_dir(self):
|
|
||||||
with self.assertRaises(subprocess.CalledProcessError) as ctx:
|
|
||||||
- subprocess.check_output(['python', '-m', 'yamllint',
|
|
||||||
+ subprocess.check_output(['python3', '-m', 'yamllint',
|
|
||||||
'/does/not/exist'],
|
|
||||||
stderr=subprocess.STDOUT)
|
|
||||||
self.assertRegexpMatches(ctx.exception.output.decode(),
|
|
||||||
@@ -62,7 +62,7 @@ class ModuleTestCase(unittest.TestCase):
|
|
||||||
|
|
||||||
def test_run_module_on_file(self):
|
|
||||||
out = subprocess.check_output(
|
|
||||||
- ['python', '-m', 'yamllint', os.path.join(self.wd, 'warn.yaml')])
|
|
||||||
+ ['python3', '-m', 'yamllint', os.path.join(self.wd, 'warn.yaml')])
|
|
||||||
lines = out.decode().splitlines()
|
|
||||||
self.assertIn('/warn.yaml', lines[0])
|
|
||||||
self.assertEqual('\n'.join(lines[1:]),
|
|
||||||
@@ -71,7 +71,7 @@ class ModuleTestCase(unittest.TestCase):
|
|
||||||
|
|
||||||
def test_run_module_on_dir(self):
|
|
||||||
with self.assertRaises(subprocess.CalledProcessError) as ctx:
|
|
||||||
- subprocess.check_output(['python', '-m', 'yamllint', self.wd])
|
|
||||||
+ subprocess.check_output(['python3', '-m', 'yamllint', self.wd])
|
|
||||||
self.assertEqual(ctx.exception.returncode, 1)
|
|
||||||
|
|
||||||
files = ctx.exception.output.decode().split('\n\n')
|
|
@ -1 +0,0 @@
|
|||||||
fix-makefile.patch
|
|
Loading…
Reference in New Issue