Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Sa’im al-Dahr: Run Sphinx doctests with Nose

Sa’im al-Dahr: Run Sphinx doctests with Nose

Sa’im al-Dahr finds the missing nose of the Sphinx. Actually a Nose plugin that reads in Sphinx doctests, and run them as Nose test cases.

Tzu-ping Chung

February 26, 2015
Tweet

More Decks by Tzu-ping Chung

Other Decks in Programming

Transcript

  1. Why? • One-stop testing • Code in docs should be

    tested • Some tests shouldn’t be in docs
  2. import  nose   from  sphinxnose  import  SphinxDoctest   def  runtests():

           nose.run(                  argv=[                          __file__,                          '-­‐-­‐with-­‐sphinx',                          '-­‐-­‐sphinx-­‐doc-­‐dir=testdocs'                  ],                  plugins=[SphinxDoctest()],          )