Merge "Add assertion to ensure the file extension"
This commit is contained in:
@@ -80,8 +80,10 @@ class TestTitles(testtools.TestCase):
|
||||
self.assertEqual(0, len(titles[refs]))
|
||||
|
||||
def test_template(self):
|
||||
files = ['specs/template.rst'] + glob.glob('specs/*/*.rst')
|
||||
files = ['specs/template.rst'] + glob.glob('specs/*/*')
|
||||
for filename in files:
|
||||
self.assertTrue(filename.endswith(".rst"),
|
||||
"spec's file must uses 'rst' extension.")
|
||||
with open(filename) as f:
|
||||
data = f.read()
|
||||
spec = docutils.core.publish_doctree(data)
|
||||
|
||||
Reference in New Issue
Block a user