rename sys_argv to cmdline_argv

This commit is contained in:
Prodesire 2017-11-07 08:15:05 +08:00
parent bfd4130f1f
commit 10f98068e1
2 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@ from pydu.compat import PY2
if PY2 and WINDOWS:
# https://bitbucket.org/techtonik/python-wget
def sys_argv():
def cmdline_argv():
"""
Uses shell32.GetCommandLineArgvW to get sys.argv as a list of Unicode
strings.
@ -38,5 +38,5 @@ if PY2 and WINDOWS:
argv.append(raw_argv[i])
return argv
else:
def sys_argv():
def cmdline_argv():
return sys.argv

View File

@ -1,8 +1,8 @@
from pydu.compat import text_type
from pydu.cmd import sys_argv
from pydu.cmd import cmdline_argv
def test_sys_argv():
argv = sys_argv()
def test_cmdline_argv():
argv = cmdline_argv()
for s in argv[1:]:
assert isinstance(s, text_type)