Merge branch 'master' into xonsh-argument-fix-i1073

This commit is contained in:
Konstantinos Tsakiltzidis 2016-06-21 00:03:54 +03:00
commit b5872efa88
2 changed files with 7 additions and 7 deletions

View file

@ -626,7 +626,6 @@ def test_is_dynamic_cwd_width():
def test_is_logfile_opt():
cases = [
('/dev/null', True),
('throwback.log', True),
('', True),
(None, True),
@ -637,6 +636,8 @@ def test_is_logfile_opt():
((1, 2), False),
(("wrong", "parameter"), False)
]
if not ON_WINDOWS:
cases.append(('/dev/null', True))
for inp, exp in cases:
obs = is_logfile_opt(inp)
yield assert_equal, exp, obs
@ -647,10 +648,11 @@ def test_to_logfile_opt():
(False, None),
(1, None),
(None, None),
('/dev/null', '/dev/null'),
('throwback.log', 'throwback.log'),
('/dev/nonexistent_dev', None),
]
if not ON_WINDOWS:
cases.append(('/dev/null', '/dev/null'))
cases.append(('/dev/nonexistent_dev', None))
for inp, exp in cases:
obs = to_logfile_opt(inp)
yield assert_equal, exp, obs

View file

@ -45,8 +45,7 @@ class _TeeOut(object):
def fileno(self):
"""Tunnel fileno() calls."""
_ = self
return sys.stdout.fileno()
return self.stdout.fileno()
class _TeeErr(object):
@ -78,8 +77,7 @@ class _TeeErr(object):
def fileno(self):
"""Tunnel fileno() calls."""
_ = self
return sys.stderr.fileno()
return self.stderr.fileno()
class Tee(io.StringIO):