Skip to content

Commit

Permalink
updated code (not pylint clean: 66 warnings remaining)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroendoggen committed Jan 3, 2013
1 parent aea1122 commit a8bdf3b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 48 deletions.
2 changes: 1 addition & 1 deletion arduino_testsuite/settings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Arduino TestSuite to automate unit tests on the Arduino platform
# Arduino TestSuite to automate unit tests on the Arduino platform
# Copyright (C) 2012 Jeroen Doggen <jeroendoggen@gmail.com>
# More info in "main.py"
#
Expand Down
21 changes: 1 addition & 20 deletions arduino_testsuite/test.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
#!/usr/bin/env python
#
# Arduino TestSuite to automate unit tests on the Arduino platform
# Copyright (C) 2012 Jeroen Doggen <jeroendoggen@gmail.com>
# More info in "main.py"
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.


import unittest
import random
Expand Down
21 changes: 0 additions & 21 deletions arduino_testsuite/testhelper.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
#!/usr/bin/env python
#
# Arduino TestSuite to automate unit tests on the Arduino platform
# Copyright (C) 2012 Jeroen Doggen <jeroendoggen@gmail.com>
# More info in "main.py"
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.

from __future__ import print_function, division # We require Python 2.6+

import time
Expand Down
12 changes: 6 additions & 6 deletions arduino_testsuite/testsuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import argparse
import datetime

from arduino_testsuite.infoprinter import InfoPrinter
import infoprinter
from arduino_testsuite.testhelper import TestHelper
from arduino_testsuite.settings import Settings

Expand All @@ -46,7 +46,6 @@ class TestSuite:
line = []
testList = []
config = Settings()
printer = InfoPrinter()

def __init__(self):
"""Initialize the suite: cli, config file, serial port."""
Expand All @@ -56,7 +55,8 @@ def __init__(self):

def printPlannedTests(self):
"""Print an overview of all the test that are planned"""
self.printer.plannedTests(self.testList)
infoprinter.planned_tests(self.testList)
infoprinter.programflow()

def runTests(self, timeout):
"""Run all the tests"""
Expand All @@ -74,7 +74,7 @@ def runTests(self, timeout):

def goToTestPath(self, currentTest):
"""Go to the folder of the current test"""
self.printer.printSetupInfo(currentTest)
infoprinter.setup_info(currentTest)
try:
os.chdir(scriptPath)
except OSError:
Expand All @@ -92,7 +92,7 @@ def goToTestPath(self, currentTest):
def uploadSketch(self, timeout):
"""Upload the sketch to the Arduino board"""
self.uploadStatus = helper.timeout_command("scons upload", timeout)
self.printer.uploadStatus(self.uploadStatus)
infoprinter.upload_status(self.uploadStatus)

def analyzeOutput(self, timeout, currentTest):
"""Analyze the test output that is received over the serial port"""
Expand Down Expand Up @@ -127,7 +127,7 @@ def readLine(self, currentTest):

def printSummary(self):
"""Print the summary of all the tests."""
self.printer.printSummary(self.FailedTestList, self.PassedTestList)
infoprinter.summary(self.FailedTestList, self.PassedTestList)

def exitValue(self):
"""Generate the exit value for the application."""
Expand Down

0 comments on commit a8bdf3b

Please sign in to comment.