Skip snippet validation if docs dir does not exist.

This commit is contained in:
Jussi Pakkanen 2018-04-23 03:24:18 +03:00
parent 83ffb3ea02
commit 01865899e5
1 changed files with 1 additions and 0 deletions

View File

@ -439,6 +439,7 @@ class InternalTests(unittest.TestCase):
kwargs = {'sources': [1, 2, 3], 'pch_sources': [4, 5, 6]}
self.assertEqual([[1, 2, 3], [4, 5, 6]], extract(kwargs, 'sources', 'pch_sources'))
@unittest.skipIf(not os.path.isdir('docs'), 'Doc dir not found, presumably because this is a tarball release.')
def test_snippets(self):
hashcounter = re.compile('^ *(#)+')
snippet_dir = Path('docs/markdown/snippets')