File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 1010import os
1111from gzip import GzipFile
1212from bz2 import BZ2File
13-
1413from io import BytesIO , UnsupportedOperation
15- from ..externals .six import PY3
16- from ..py3k import asstr , asbytes
17-
18- from ..tmpdirs import InTemporaryDirectory
1914
15+ from ..checkwarns import ErrorWarnings
16+ from ..py3k import asstr , asbytes
2017from ..openers import Opener , ImageOpener
18+ from ..tmpdirs import InTemporaryDirectory
19+ from ..volumeutils import BinOpener
2120
22- from nose .case import Test
2321from nose .tools import (assert_true , assert_false , assert_equal ,
2422 assert_not_equal , assert_raises )
2523
@@ -85,6 +83,10 @@ def test_Opener_various():
8583 # Just check there is a fileno
8684 assert_not_equal (fobj .fileno (), 0 )
8785
86+ def test_BinOpener ():
87+ with ErrorWarnings ():
88+ assert_raises (DeprecationWarning ,
89+ BinOpener , 'test.txt' , 'r' )
8890
8991class TestImageOpener :
9092 def setUp (self ):
You can’t perform that action at this time.
0 commit comments