1 parent 6f2fb0b commit 6c5c83aCopy full SHA for 6c5c83a
1 file changed
tests/test_core.py
@@ -4,7 +4,10 @@
4
import tempfile
5
import warnings
6
import sh
7
-from io import BytesIO
+try:
8
+ from StringIO import StringIO
9
+except ImportError:
10
+ from io import StringIO
11
12
from dotenv import load_dotenv, find_dotenv, set_key
13
from dotenv.main import parse_dotenv
@@ -115,7 +118,7 @@ def test_ipython_override():
115
118
116
119
117
120
def test_parse_dotenv_stream():
- stream = BytesIO('DOTENV=WORKS\n')
121
+ stream = StringIO('DOTENV=WORKS\n')
122
stream.seek(0)
123
parsed_generator = parse_dotenv(stream=stream)
124
parsed_dict = dict(iter(parsed_generator))
0 commit comments