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 10
10
import os
11
11
from gzip import GzipFile
12
12
from bz2 import BZ2File
13
-
14
13
from io import BytesIO , UnsupportedOperation
15
- from ..externals .six import PY3
16
- from ..py3k import asstr , asbytes
17
-
18
- from ..tmpdirs import InTemporaryDirectory
19
14
15
+ from ..checkwarns import ErrorWarnings
16
+ from ..py3k import asstr , asbytes
20
17
from ..openers import Opener , ImageOpener
18
+ from ..tmpdirs import InTemporaryDirectory
19
+ from ..volumeutils import BinOpener
21
20
22
- from nose .case import Test
23
21
from nose .tools import (assert_true , assert_false , assert_equal ,
24
22
assert_not_equal , assert_raises )
25
23
@@ -85,6 +83,10 @@ def test_Opener_various():
85
83
# Just check there is a fileno
86
84
assert_not_equal (fobj .fileno (), 0 )
87
85
86
+ def test_BinOpener ():
87
+ with ErrorWarnings ():
88
+ assert_raises (DeprecationWarning ,
89
+ BinOpener , 'test.txt' , 'r' )
88
90
89
91
class TestImageOpener :
90
92
def setUp (self ):
You can’t perform that action at this time.
0 commit comments