File tree Expand file tree Collapse file tree 5 files changed +20
-8
lines changed Expand file tree Collapse file tree 5 files changed +20
-8
lines changed Original file line number Diff line number Diff line change 66
77"""Unit tests for the MSVSSettings.py file."""
88
9- import StringIO
9+ try :
10+ from cStringIO import StringIO
11+ except ImportError :
12+ from io import StringIO
13+
1014import unittest
1115import gyp .MSVSSettings as MSVSSettings
1216
1317
1418class TestSequenceFunctions (unittest .TestCase ):
1519
1620 def setUp (self ):
17- self .stderr = StringIO . StringIO ()
21+ self .stderr = StringIO ()
1822
1923 def _ExpectedWarnings (self , expected ):
2024 """Compares recorded lines to expected warnings."""
Original file line number Diff line number Diff line change 88
99import gyp .easy_xml as easy_xml
1010import unittest
11- import StringIO
11+ try :
12+ from cStringIO import StringIO
13+ except ImportError :
14+ from io import StringIO
1215
1316
1417class TestSequenceFunctions (unittest .TestCase ):
1518
1619 def setUp (self ):
17- self .stderr = StringIO . StringIO ()
20+ self .stderr = StringIO ()
1821
1922 def test_EasyXml_simple (self ):
2023 self .assertEqual (
Original file line number Diff line number Diff line change 77
88import gyp .generator .msvs as msvs
99import unittest
10- import StringIO
10+ try :
11+ from cStringIO import StringIO
12+ except ImportError :
13+ from io import StringIO
1114
1215
1316class TestSequenceFunctions (unittest .TestCase ):
1417
1518 def setUp (self ):
16- self .stderr = StringIO . StringIO ()
19+ self .stderr = StringIO ()
1720
1821 def test_GetLibraries (self ):
1922 self .assertEqual (
Original file line number Diff line number Diff line change 1919import gyp .msvs_emulation
2020import gyp .MSVSUtil as MSVSUtil
2121import gyp .xcode_emulation
22- from cStringIO import StringIO
22+ try :
23+ from cStringIO import StringIO
24+ except ImportError :
25+ from io import StringIO
2326
2427from gyp .common import GetEnvironFallback
2528import gyp .ninja_syntax as ninja_syntax
Original file line number Diff line number Diff line change 88
99import gyp .generator .ninja as ninja
1010import unittest
11- import StringIO
1211import sys
1312import TestCommon
1413
You can’t perform that action at this time.
0 commit comments