Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions documentation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,8 @@ Supported renames:
+------------------------------+-------------------------------------+---------------------------------------+
| ``filterfalse`` | :func:`py2:itertools.ifilterfalse` | :func:`py3:itertools.filterfalse` |
+------------------------------+-------------------------------------+---------------------------------------+
| ``getargspec`` | :func:`py2:inspect.getargspec` | :func:`py3:inspect.getfullargspec` |
+------------------------------+-------------------------------------+---------------------------------------+
| ``getcwd`` | :func:`py2:os.getcwdu` | :func:`py3:os.getcwd` |
+------------------------------+-------------------------------------+---------------------------------------+
| ``getcwdb`` | :func:`py2:os.getcwd` | :func:`py3:os.getcwdb` |
Expand Down
1 change: 1 addition & 0 deletions six.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ class _MovedItems(_LazyModule):
MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"),
MovedAttribute("intern", "__builtin__", "sys"),
MovedAttribute("map", "itertools", "builtins", "imap", "map"),
MovedAttribute("getargspec", "inspect", "inspect", "getargspec", "getfullargspec"),
MovedAttribute("getcwd", "os", "os", "getcwdu", "getcwd"),
MovedAttribute("getcwdb", "os", "os", "getcwd", "getcwdb"),
MovedAttribute("getoutput", "commands", "subprocess"),
Expand Down
10 changes: 10 additions & 0 deletions test_six.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,16 @@ def test_map():
assert six.advance_iterator(map(lambda x: x + 1, range(2))) == 1


def test_getargspec():
from six.moves import getargspec

def test(a, b='c', *args, **kwargs):
pass

argspec = getargspec(test)
assert argspec == (['a', 'b'], 'args', 'kwargs', ('c',))


def test_getoutput():
from six.moves import getoutput
output = getoutput('echo "foo"')
Expand Down