Chromium Code Reviews| Index: pylib/gyp/MSVSSettings_test.py |
| diff --git a/pylib/gyp/MSVSSettings_test.py b/pylib/gyp/MSVSSettings_test.py |
| index bf6ea6b802ff91f23780635e380a32c4744d1686..73ed25e27d4dda85e7b49500156dc7e173c3b9a3 100755 |
| --- a/pylib/gyp/MSVSSettings_test.py |
| +++ b/pylib/gyp/MSVSSettings_test.py |
| @@ -6,7 +6,10 @@ |
| """Unit tests for the MSVSSettings.py file.""" |
| -import StringIO |
| +try: |
| + from StringIO import StringIO |
| +except ImportError: |
| + from io import StringIO |
|
Nico
2016/07/29 22:22:05
Isn't the recommended pattern "try py3 way, and if
AWhetter
2016/11/05 23:59:49
You're right. I've fixed this on my github.
|
| import unittest |
| import gyp.MSVSSettings as MSVSSettings |
| @@ -14,7 +17,7 @@ import gyp.MSVSSettings as MSVSSettings |
| class TestSequenceFunctions(unittest.TestCase): |
| def setUp(self): |
| - self.stderr = StringIO.StringIO() |
| + self.stderr = StringIO() |
| def _ExpectedWarnings(self, expected): |
| """Compares recorded lines to expected warnings.""" |