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):
5959def _my_fs (module ):
6060 """Create a mock filesystem to be used in examples."""
6161 my_fs = MemoryFS ()
62-
6362 if module == "fs.base" :
6463 my_fs .makedir ("Desktop" )
6564 my_fs .makedir ("Videos" )
6665 my_fs .touch ("Videos/starwars.mov" )
6766 my_fs .touch ("file.txt" )
68-
6967 elif module == "fs.info" :
7068 my_fs .touch ("foo.tar.gz" )
7169 my_fs .settext ("foo.py" , "print('Hello, world!')" )
7270 my_fs .makedir ("bar" )
73-
7471 elif module in {"fs.walk" , "fs.glob" }:
7572 my_fs .makedir ("dir1" )
7673 my_fs .makedir ("dir2" )
7774 my_fs .settext ("foo.py" , "print('Hello, world!')" )
7875 my_fs .touch ("foo.pyc" )
7976 my_fs .settext ("bar.py" , "print('ok')\n \n # this is a comment\n " )
8077 my_fs .touch ("bar.pyc" )
81-
82- # # used in `fs.glob`
83- # home_fs.touch("foo.pyc")
84- # home_fs.touch("bar.pyc")
8578 return my_fs
8679
8780
@@ -129,11 +122,6 @@ def tearDown(self):
129122 self ._ftpfs_mock .__exit__ (None , None , None )
130123 warnings .simplefilter (warnings .defaultaction )
131124
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-
137125 # recursively traverse all library submodules and load tests from them
138126 packages = [None , fs ]
139127 for pkg in iter (packages .pop , None ):
You can’t perform that action at this time.
0 commit comments