mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix failing unit tests
This commit is contained in:
parent
392e6ecd6f
commit
326ddd10d7
@ -117,7 +117,7 @@ def make_main(argv=sys.argv[1:]):
|
||||
# type: (List[str]) -> int
|
||||
"""Sphinx build "make mode" entry."""
|
||||
from sphinx import make_mode
|
||||
return make_mode.run_make_mode(argv[2:]) # type: ignore
|
||||
return make_mode.run_make_mode(argv[1:]) # type: ignore
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@ -114,7 +114,7 @@ def handle_exception(app, opts, exception, stderr=sys.stderr):
|
||||
file=stderr)
|
||||
|
||||
|
||||
def main(argv):
|
||||
def main(argv=sys.argv[1:]):
|
||||
# type: (List[unicode]) -> int
|
||||
parser = optparse.OptionParser(USAGE, epilog=EPILOG, formatter=MyFormatter())
|
||||
parser.add_option('--version', action='store_true', dest='version',
|
||||
|
@ -298,8 +298,7 @@ def test_default_filename(tempdir):
|
||||
|
||||
|
||||
def test_extensions(tempdir):
|
||||
qs.main(['sphinx-quickstart', '-q',
|
||||
'-p', 'project_name', '-a', 'author',
|
||||
qs.main(['-q', '-p', 'project_name', '-a', 'author',
|
||||
'--extensions', 'foo,bar,baz', tempdir])
|
||||
|
||||
conffile = tempdir / 'conf.py'
|
||||
|
@ -179,13 +179,13 @@ def check_xhtml(fn, lines):
|
||||
yield lno + 1, "used " + bad_tag
|
||||
|
||||
|
||||
def main(argv):
|
||||
def main(argv=sys.argv[1:]):
|
||||
parser = OptionParser(usage='Usage: %prog [-v] [-i ignorepath]* [path]')
|
||||
parser.add_option('-v', '--verbose', dest='verbose', default=False,
|
||||
action='store_true')
|
||||
parser.add_option('-i', '--ignore-path', dest='ignored_paths',
|
||||
default=[], action='append')
|
||||
options, args = parser.parse_args(argv[1:])
|
||||
options, args = parser.parse_args(argv)
|
||||
|
||||
if len(args) == 0:
|
||||
path = '.'
|
||||
|
Loading…
Reference in New Issue
Block a user