Skip to content

Commit

Permalink
Fixes broken build by moving __future__ imports to top
Browse files Browse the repository at this point in the history
  • Loading branch information
shidarin committed Apr 24, 2014
1 parent 7e72007 commit ad44719
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cdl_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@
# IMPORTS
# ==============================================================================

from __future__ import print_function

from argparse import ArgumentParser
from ast import literal_eval
import os
Expand All @@ -109,8 +111,6 @@
except NameError: # pragma: no cover
raw_input = input # pylint: disable=W0622, C0103

from __future__ import print_function

# ==============================================================================
# GLOBALS
# ==============================================================================
Expand Down
7 changes: 7 additions & 0 deletions tests/test_cdl_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
import mock
import os
from random import choice, random, randrange
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
import sys
import tempfile
import unittest
Expand Down Expand Up @@ -1918,13 +1922,16 @@ def setUp(self):
self.inputFormats = cdl_convert.INPUT_FORMATS
self.outputFormats = cdl_convert.OUTPUT_FORMATS
self.sysargv = sys.argv
self.stdout = sys.stdout
sys.stdout = StringIO()

#===========================================================================

def tearDown(self):
cdl_convert.INPUT_FORMATS = self.inputFormats
cdl_convert.OUTPUT_FORMATS = self.outputFormats
sys.argv = self.sysargv
sys.stdout = self.stdout

#===========================================================================
# TESTS
Expand Down

0 comments on commit ad44719

Please sign in to comment.