mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-02 09:10:11 +02:00
parent
6030445be0
commit
95c3ab2454
@ -1315,6 +1315,11 @@ class CommonTest(unittest.TestCase):
|
||||
self.assertEqual(ret, ('ACRA', None, 'srclib/ACRA'))
|
||||
|
||||
def test_run_yamllint_wellformed(self):
|
||||
try:
|
||||
import yamllint.config
|
||||
yamllint.config # make pyflakes ignore this
|
||||
except ImportError:
|
||||
self.skipTest('yamllint not installed')
|
||||
with tempfile.TemporaryDirectory() as tmpdir, TmpCwd(tmpdir):
|
||||
with open('wellformed.yml', 'w') as f:
|
||||
f.write(textwrap.dedent('''\
|
||||
@ -1328,6 +1333,11 @@ class CommonTest(unittest.TestCase):
|
||||
self.assertEqual(result, '')
|
||||
|
||||
def test_run_yamllint_malformed(self):
|
||||
try:
|
||||
import yamllint.config
|
||||
yamllint.config # make pyflakes ignore this
|
||||
except ImportError:
|
||||
self.skipTest('yamllint not installed')
|
||||
with tempfile.TemporaryDirectory() as tmpdir, TmpCwd(tmpdir):
|
||||
with open('malformed.yml', 'w') as f:
|
||||
f.write(textwrap.dedent('''\
|
||||
|
Loading…
Reference in New Issue
Block a user