Skip to content

Commit

Permalink
Style fixes: spaces around "="
Browse files Browse the repository at this point in the history
  • Loading branch information
KOLANICH committed Dec 25, 2017
1 parent 6cda9eb commit 45714b5
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions testSuite/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
TARGET = ''
NEEDS = [ ]

testSuiteBaseDir=os.path.dirname(__file__)
testsDir=os.path.join(testSuiteBaseDir, "tests")
tmpDir=os.path.join(testSuiteBaseDir, "tmp")
testSuiteBaseDir = os.path.dirname(__file__)
testsDir = os.path.join(testSuiteBaseDir, "tests")
tmpDir = os.path.join(testSuiteBaseDir, "tmp")

class CocoTester( object ):
def __init__( self, compiler, targetLanguageExt, testSuite ):
Expand All @@ -21,17 +21,17 @@ def __init__( self, compiler, targetLanguageExt, testSuite ):
self._suite = testSuite

def generateTest(self, name, isErrorTest):
dirName=os.path.join(testsDir, name)
testFileName=os.path.join(dirName, 'Test.atg')
dirName = os.path.join(testsDir, name)
testFileName = os.path.join(dirName, 'Test.atg')

outputFileName=os.path.join(dirName, 'Output.txt')
traceFileName=os.path.join(dirName, 'Trace.txt')
parserFileName=os.path.join(dirName, 'Parser.py')
scannerFileName=os.path.join(dirName, 'Scanner.py')
outputFileName = os.path.join(dirName, 'Output.txt')
traceFileName = os.path.join(dirName, 'Trace.txt')
parserFileName = os.path.join(dirName, 'Parser.py')
scannerFileName = os.path.join(dirName, 'Scanner.py')

traceResFileName=os.path.join(tmpDir, 'trace.txt')
parserResFileName=os.path.join(tmpDir, 'Parser.py')
scannerResFileName=os.path.join(tmpDir, 'Scanner.py')
traceResFileName = os.path.join(tmpDir, 'trace.txt')
parserResFileName = os.path.join(tmpDir, 'Parser.py')
scannerResFileName = os.path.join(tmpDir, 'Scanner.py')

class Test(unittest.TestCase):
maxDiff=None
Expand All @@ -46,15 +46,15 @@ def setUpClass():
stdout=subprocess.PIPE
) as proc:
proc.wait()
__class__.output=io.TextIOWrapper(proc.stdout).read()
__class__.output = io.TextIOWrapper(proc.stdout).read()
os.makedirs(tmpDir, exist_ok=True)

def testTrace(tself):
assertFilesEqual(tself, traceResFileName, traceFileName)

def testOutput(tself):
with open(outputFileName, "rt", encoding="utf-8") as f:
referenceOuput=f.read()
referenceOuput = f.read()
tself.assertEqual(__class__.output, referenceOuput)

if not isErrorTest:
Expand All @@ -72,8 +72,8 @@ def generateTests( self ):
test.__name__=name
yield test
def __call__(self):
loader=unittest.TestLoader()
runner=unittest.TextTestRunner()
loader = unittest.TestLoader()
runner = unittest.TextTestRunner()
for testClass in self.generateTests():
runner.run(loader.loadTestsFromTestCase(testClass))

Expand Down

0 comments on commit 45714b5

Please sign in to comment.