mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
Py v3.4 compat
This commit is contained in:
parent
70d7ef7c31
commit
38cffd2bdc
1 changed files with 2 additions and 1 deletions
|
@ -1367,7 +1367,8 @@ def test_iglobpath_empty_str(monkeypatch, xonsh_builtins):
|
|||
# fail to return valid results, like an empty filename
|
||||
def mockscandir(path):
|
||||
yield ''
|
||||
monkeypatch.setattr(os, 'scandir', mockscandir)
|
||||
if hasattr(os, 'scandir'):
|
||||
monkeypatch.setattr(os, 'scandir', mockscandir)
|
||||
def mocklistdir(path):
|
||||
return ['']
|
||||
monkeypatch.setattr(os, 'listdir', mocklistdir)
|
||||
|
|
Loading…
Add table
Reference in a new issue