File tree Expand file tree Collapse file tree 1 file changed +0
-12
lines changed Expand file tree Collapse file tree 1 file changed +0
-12
lines changed Original file line number Diff line number Diff line change @@ -59,29 +59,22 @@ def _open_fs(path):
59
59
def _my_fs (module ):
60
60
"""Create a mock filesystem to be used in examples."""
61
61
my_fs = MemoryFS ()
62
-
63
62
if module == "fs.base" :
64
63
my_fs .makedir ("Desktop" )
65
64
my_fs .makedir ("Videos" )
66
65
my_fs .touch ("Videos/starwars.mov" )
67
66
my_fs .touch ("file.txt" )
68
-
69
67
elif module == "fs.info" :
70
68
my_fs .touch ("foo.tar.gz" )
71
69
my_fs .settext ("foo.py" , "print('Hello, world!')" )
72
70
my_fs .makedir ("bar" )
73
-
74
71
elif module in {"fs.walk" , "fs.glob" }:
75
72
my_fs .makedir ("dir1" )
76
73
my_fs .makedir ("dir2" )
77
74
my_fs .settext ("foo.py" , "print('Hello, world!')" )
78
75
my_fs .touch ("foo.pyc" )
79
76
my_fs .settext ("bar.py" , "print('ok')\n \n # this is a comment\n " )
80
77
my_fs .touch ("bar.pyc" )
81
-
82
- # # used in `fs.glob`
83
- # home_fs.touch("foo.pyc")
84
- # home_fs.touch("bar.pyc")
85
78
return my_fs
86
79
87
80
@@ -129,11 +122,6 @@ def tearDown(self):
129
122
self ._ftpfs_mock .__exit__ (None , None , None )
130
123
warnings .simplefilter (warnings .defaultaction )
131
124
132
- # doctests are not compatible with `green`, so we may want to bail out
133
- # early if `green` is running the tests
134
- if sys .argv [0 ].endswith ("green" ):
135
- return tests
136
-
137
125
# recursively traverse all library submodules and load tests from them
138
126
packages = [None , fs ]
139
127
for pkg in iter (packages .pop , None ):
You can’t perform that action at this time.
0 commit comments