File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,7 @@ class ImageOpener(Opener):
155155 attributes, via the `register_ex_from_images`. The class can therefore
156156 change state when image classes are defined.
157157 """
158+ compress_ext_map = Opener .compress_ext_map .copy ()
158159
159160 @classmethod
160161 def register_ext_from_image (opener_klass , ext , func_def ):
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ def test_Opener():
5757 # mode is gently ignored
5858 fobj = Opener (obj , mode = 'r' )
5959
60+
6061def test_Opener_various ():
6162 # Check we can do all sorts of files here
6263 message = b"Oh what a giveaway"
@@ -84,11 +85,13 @@ def test_Opener_various():
8485 # Just check there is a fileno
8586 assert_not_equal (fobj .fileno (), 0 )
8687
88+
8789def test_BinOpener ():
8890 with error_warnings ():
8991 assert_raises (DeprecationWarning ,
9092 BinOpener , 'test.txt' , 'r' )
9193
94+
9295class TestImageOpener :
9396 alternate_exts = ()
9497 def setUp (self ):
@@ -123,6 +126,9 @@ def file_opener(fileish, mode):
123126 pass
124127 assert_true (os .path .exists ('test.foo' ))
125128
129+ # Check this doesn't add anything to parent
130+ assert_false ('.foo' in Opener .compress_ext_map )
131+
126132
127133def test_file_like_wrapper ():
128134 # Test wrapper using BytesIO (full API)
You can’t perform that action at this time.
0 commit comments