[Proctor-checkins] CVS: Proctor/proctorlib test_background_runner.py,NONE,1.1
Status: Alpha
Brought to you by:
doughellmann
|
From: Doug H. <dou...@us...> - 2003-05-04 22:36:24
|
Update of /cvsroot/proctor/Proctor/proctorlib
In directory sc8-pr-cvs1:/tmp/cvs-serv711/proctorlib
Added Files:
test_background_runner.py
Log Message:
Tests for new classes to manage proctorbatch execution in the background.
--- NEW FILE: test_background_runner.py ---
#
# $Id: test_background_runner.py,v 1.1 2003/05/04 22:36:20 doughellmann Exp $
#
# Copyright 2003 Racemi, Inc.
#
"""Tests for background_runner.py
"""
#
# Import system modules
#
import unittest
#
# Import Local modules
#
from proctorlib.background_runner import BackgroundTestRunner
#
# Module
#
class BackgroundTestRunnerCommandTest(unittest.TestCase):
def testWithoutRunning(self):
btr = BackgroundTestRunner(runTests=0, inputPaths=['foo'])
command = btr.getCommand()
self.failUnlessEqual(
command,
'proctorbatch --parsable --no-coverage --list --no-run foo'
)
return
def testWithRunning(self):
btr = BackgroundTestRunner(inputPaths=['foo'])
command = btr.getCommand()
self.failUnlessEqual(
command,
'proctorbatch --parsable --no-coverage --list foo'
)
return
def testWithoutRunningMultiplePaths(self):
btr = BackgroundTestRunner(runTests=0, inputPaths=['foo', 'bar'])
command = btr.getCommand()
self.failUnlessEqual(
command,
'proctorbatch --parsable --no-coverage --list --no-run foo bar'
)
return
def testWithRunningMultiplePaths(self):
btr = BackgroundTestRunner(inputPaths=['foo', 'bar'])
command = btr.getCommand()
self.failUnlessEqual(
command,
'proctorbatch --parsable --no-coverage --list foo bar'
)
return
if __name__ == '__main__':
unittest.main()
|