File tree 5 files changed +20
-8
lines changed
5 files changed +20
-8
lines changed Original file line number Diff line number Diff line change 6
6
7
7
"""Unit tests for the MSVSSettings.py file."""
8
8
9
- import StringIO
9
+ try :
10
+ from cStringIO import StringIO
11
+ except ImportError :
12
+ from io import StringIO
13
+
10
14
import unittest
11
15
import gyp .MSVSSettings as MSVSSettings
12
16
13
17
14
18
class TestSequenceFunctions (unittest .TestCase ):
15
19
16
20
def setUp (self ):
17
- self .stderr = StringIO . StringIO ()
21
+ self .stderr = StringIO ()
18
22
19
23
def _ExpectedWarnings (self , expected ):
20
24
"""Compares recorded lines to expected warnings."""
Original file line number Diff line number Diff line change 8
8
9
9
import gyp .easy_xml as easy_xml
10
10
import unittest
11
- import StringIO
11
+ try :
12
+ from cStringIO import StringIO
13
+ except ImportError :
14
+ from io import StringIO
12
15
13
16
14
17
class TestSequenceFunctions (unittest .TestCase ):
15
18
16
19
def setUp (self ):
17
- self .stderr = StringIO . StringIO ()
20
+ self .stderr = StringIO ()
18
21
19
22
def test_EasyXml_simple (self ):
20
23
self .assertEqual (
Original file line number Diff line number Diff line change 7
7
8
8
import gyp .generator .msvs as msvs
9
9
import unittest
10
- import StringIO
10
+ try :
11
+ from cStringIO import StringIO
12
+ except ImportError :
13
+ from io import StringIO
11
14
12
15
13
16
class TestSequenceFunctions (unittest .TestCase ):
14
17
15
18
def setUp (self ):
16
- self .stderr = StringIO . StringIO ()
19
+ self .stderr = StringIO ()
17
20
18
21
def test_GetLibraries (self ):
19
22
self .assertEqual (
Original file line number Diff line number Diff line change 19
19
import gyp .msvs_emulation
20
20
import gyp .MSVSUtil as MSVSUtil
21
21
import gyp .xcode_emulation
22
- from cStringIO import StringIO
22
+ try :
23
+ from cStringIO import StringIO
24
+ except ImportError :
25
+ from io import StringIO
23
26
24
27
from gyp .common import GetEnvironFallback
25
28
import gyp .ninja_syntax as ninja_syntax
Original file line number Diff line number Diff line change 8
8
9
9
import gyp .generator .ninja as ninja
10
10
import unittest
11
- import StringIO
12
11
import sys
13
12
import TestCommon
14
13
You can’t perform that action at this time.
0 commit comments