You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_documentation.py 1.3 kB

4 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import os
  4. import unittest
  5. os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
  6. from sphinx.application import Sphinx
  7. class DocTest(unittest.TestCase):
  8. source_dir = u'docs/'
  9. config_dir = u'docs/'
  10. output_dir = u'docs/test_build'
  11. doctree_dir = u'docs/test_build/doctrees'
  12. all_files = True
  13. @classmethod
  14. def setUpClass(cls):
  15. os.environ["SPHINXBUILD"] = "1"
  16. def test_html_documentation(self):
  17. app = Sphinx(
  18. self.source_dir,
  19. self.config_dir,
  20. self.output_dir,
  21. self.doctree_dir,
  22. buildername='html',
  23. warningiserror=True,
  24. )
  25. app.build(force_all=self.all_files)
  26. # TODO: additional checks here if needed
  27. def test_text_documentation(self):
  28. # The same, but with different buildername
  29. app = Sphinx(
  30. self.source_dir,
  31. self.config_dir,
  32. self.output_dir,
  33. self.doctree_dir,
  34. buildername='text',
  35. warningiserror=False,
  36. )
  37. app.build(force_all=self.all_files)
  38. # TODO: additional checks if needed
  39. def tearDown(self):
  40. # TODO: clean up the output directory
  41. pass
  42. if __name__ == '__main__':
  43. unittest.main()

TensorLayer3.0 是一款兼容多种深度学习框架为计算后端的深度学习库。计划兼容TensorFlow, Pytorch, MindSpore, Paddle.