Commits

andrea_crotti committed 2d2f264 Merge

merge changes and remove the parser.print_help function, which is
called anyway when the arguments are not correct

  • Participants
  • Parent commits 49724e4, 49bd47b

Comments (0)

Files changed (13)

File tinkerer/cmdline.py

         create_page(command.page[0], command.quiet, command.filename)
     elif command.draft:
         create_draft(command.draft[0], command.quiet, command.filename)
-    else:
-        parser.print_help()
 
     return 0

File tinkertest/test_categories.py

 import os
 from tinkerer import paths, post
 import unittest
-import utils
+from tinkertest import utils
 
 
 # test case
 
 # extension setup
 def setup(app):
+    if utils.is_module(app):
+        return
     app.connect("build-finished", build_finished)
     

File tinkertest/test_cmdline.py

 import os
 import tinkerer
 from tinkerer import cmdline, paths, post
-import utils
+from tinkertest import utils
 
 
 # test tinkerer command line

File tinkertest/test_draft.py

 import datetime
 import os
 from tinkerer import draft, master, page, post
-import utils
+from tinkertest import utils
 
 
 # test creating drafts

File tinkertest/test_master.py

     :license: FreeBSD, see LICENSE file
 '''
 from tinkerer import master
-import utils
+from tinkertest import utils
 
 
 # test updating master document

File tinkertest/test_metadata.py

 '''
 import datetime
 from tinkerer import page, post
-import utils
+from tinkertest import utils
 
 
 # test case
 
 # extension setup
 def setup(app):
+    if utils.is_module(app):
+        return
     app.connect("build-finished", build_finished)

File tinkertest/test_ordering.py

 '''
 import datetime
 import unittest
-import utils
+from tinkertest import utils
 import tinkerer
 from tinkerer import page, post
 
 
 # extension setup    
 def setup(app):
+    if utils.is_module(app):
+        return
     app.connect("build-finished", build_finished)

File tinkertest/test_page.py

 import os
 from tinkerer import page
 import tinkerer
-import utils
+from tinkertest import utils
 
 
 # test creating new page

File tinkertest/test_patch.py

 import datetime
 import os
 from tinkerer import paths, post
-import utils
+from tinkertest import utils
 import sys
 
 

File tinkertest/test_post.py

 import os
 from tinkerer import post
 import tinkerer
-import utils
+from tinkertest import utils
 
 
 # test creating new post

File tinkertest/test_rss.py

 import email.utils
 import os
 from tinkerer import paths, post
-import utils
+from tinkertest import utils
 import time
 import xml.dom.minidom
 

File tinkertest/test_tags.py

 import os
 from tinkerer import paths, post
 import unittest
-import utils
+from tinkertest import utils
 
 
 # test case
 
 # extension setup
 def setup(app):
+    if utils.is_module(app):
+        return
     app.connect("build-finished", build_finished)
-    
+ 

File tinkertest/utils.py

 import shutil
 import sys
 from tinkerer import cmdline, page, paths, post, writer
+import types
 import unittest
 
 
         shutil.rmtree(TEST_ROOT)
 
 
+# nose mistakenly calls Sphinx extension setup functions thinking they are
+# test setups with a module parameter
+def is_module(m):
+    return type(m) is types.ModuleType
+
+
 # used by Sphinx to lookup extensions
 sys.path.append(os.path.abspath(os.path.dirname(__file__)))