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
|
# type: (List[str]) -> int
|
||||||
"""Sphinx build "make mode" entry."""
|
"""Sphinx build "make mode" entry."""
|
||||||
from sphinx import make_mode
|
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__':
|
if __name__ == '__main__':
|
||||||
|
@ -114,7 +114,7 @@ def handle_exception(app, opts, exception, stderr=sys.stderr):
|
|||||||
file=stderr)
|
file=stderr)
|
||||||
|
|
||||||
|
|
||||||
def main(argv):
|
def main(argv=sys.argv[1:]):
|
||||||
# type: (List[unicode]) -> int
|
# type: (List[unicode]) -> int
|
||||||
parser = optparse.OptionParser(USAGE, epilog=EPILOG, formatter=MyFormatter())
|
parser = optparse.OptionParser(USAGE, epilog=EPILOG, formatter=MyFormatter())
|
||||||
parser.add_option('--version', action='store_true', dest='version',
|
parser.add_option('--version', action='store_true', dest='version',
|
||||||
|
@ -298,8 +298,7 @@ def test_default_filename(tempdir):
|
|||||||
|
|
||||||
|
|
||||||
def test_extensions(tempdir):
|
def test_extensions(tempdir):
|
||||||
qs.main(['sphinx-quickstart', '-q',
|
qs.main(['-q', '-p', 'project_name', '-a', 'author',
|
||||||
'-p', 'project_name', '-a', 'author',
|
|
||||||
'--extensions', 'foo,bar,baz', tempdir])
|
'--extensions', 'foo,bar,baz', tempdir])
|
||||||
|
|
||||||
conffile = tempdir / 'conf.py'
|
conffile = tempdir / 'conf.py'
|
||||||
|
@ -179,13 +179,13 @@ def check_xhtml(fn, lines):
|
|||||||
yield lno + 1, "used " + bad_tag
|
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 = OptionParser(usage='Usage: %prog [-v] [-i ignorepath]* [path]')
|
||||||
parser.add_option('-v', '--verbose', dest='verbose', default=False,
|
parser.add_option('-v', '--verbose', dest='verbose', default=False,
|
||||||
action='store_true')
|
action='store_true')
|
||||||
parser.add_option('-i', '--ignore-path', dest='ignored_paths',
|
parser.add_option('-i', '--ignore-path', dest='ignored_paths',
|
||||||
default=[], action='append')
|
default=[], action='append')
|
||||||
options, args = parser.parse_args(argv[1:])
|
options, args = parser.parse_args(argv)
|
||||||
|
|
||||||
if len(args) == 0:
|
if len(args) == 0:
|
||||||
path = '.'
|
path = '.'
|
||||||
|
Loading…
Reference in New Issue
Block a user