Package pololu :: Package motors :: Package tests :: Module test_qik2s9v1 :: Class TestQik2s9v1
[hide private]
[frames] | no frames]

Class TestQik2s9v1

source code


Unit tests for the Qik 2s9v1 motor controller.

Most tests have a for loop which first tests the pololu protocol then tests the compact protocol.

Nested Classes [hide private]

Inherited from unittest.case.TestCase: failureException

Instance Methods [hide private]
 
__init__(self, name)
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
source code
 
setUp(self)
Hook method for setting up the test fixture before exercising it.
source code
 
tearDown(self)
Hook method for deconstructing the test fixture after testing it.
source code
 
test_getConfigForDevice(self) source code
 
test_close(self) source code
 
test_setCompactProtocol(self)
The compact protocol is not the default.
source code
 
test_setPololuProtocol(self)
The pololu portocol is the default.
source code
 
test_getFirmwareVersion(self) source code
 
test_getError_DataOverrunError(*args, **kwargs) source code
 
test_getError_FrameError(*args, **kwargs) source code
 
test_getError_CRCError(*args, **kwargs) source code
 
test_getError_FormatError(self) source code
 
test_getError_TimeoutError(self) source code
 
test_getDeviceID(self)
Only test Pololu protocol, it's the only protocol that uses the device ID.
source code
 
test_getPWMFrequency(self) source code
 
test_getMotorShutdown(self) source code
 
test_getSerialTimeout(self) source code
 
test_setDeviceID(self) source code
 
test_setPWMFrequency(self) source code
 
test_setMotorShutdown(self) source code
 
test_setSerialTimeout(self) source code
 
test_setM0Coast(*args, **kwargs) source code
 
test_setM1Coast(*args, **kwargs) source code
 
test_setM0Speed(*args, **kwargs) source code
 
test_setM1Speed(*args, **kwargs) source code

Inherited from unittest.case.TestCase: __call__, __eq__, __hash__, __ne__, __repr__, __str__, addCleanup, addTypeEqualityFunc, assertAlmostEqual, assertAlmostEquals, assertDictContainsSubset, assertDictEqual, assertEqual, assertEquals, assertFalse, assertGreater, assertGreaterEqual, assertIn, assertIs, assertIsInstance, assertIsNone, assertIsNot, assertIsNotNone, assertItemsEqual, assertLess, assertLessEqual, assertListEqual, assertMultiLineEqual, assertNotAlmostEqual, assertNotAlmostEquals, assertNotEqual, assertNotEquals, assertNotIn, assertNotIsInstance, assertNotRegexpMatches, assertRaises, assertRaisesRegexp, assertRegexpMatches, assertSequenceEqual, assertSetEqual, assertTrue, assertTupleEqual, assert_, countTestCases, debug, defaultTestResult, doCleanups, fail, failIf, failIfAlmostEqual, failIfEqual, failUnless, failUnlessAlmostEqual, failUnlessEqual, failUnlessRaises, id, run, shortDescription, skipTest

Inherited from unittest.case.TestCase (private): _addSkip, _baseAssertEqual, _deprecate, _formatMessage, _getAssertEqualityFunc, _truncateMessage

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]

Inherited from unittest.case.TestCase: setUpClass, tearDownClass

Class Variables [hide private]
  _DEFAULT_TTY = '/dev/ttyUSB0'
  _PROTOCOL_MAP = {0: 'Pololu Protocol', 1: 'Compact Protocol'}

Inherited from unittest.case.TestCase: longMessage, maxDiff

Inherited from unittest.case.TestCase (private): _classSetupFailed, _diffThreshold

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name)
(Constructor)

source code 
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
Overrides: object.__init__
(inherited documentation)

setUp(self)

source code 
Hook method for setting up the test fixture before exercising it.
Overrides: unittest.case.TestCase.setUp
(inherited documentation)

tearDown(self)

source code 
Hook method for deconstructing the test fixture after testing it.
Overrides: unittest.case.TestCase.tearDown
(inherited documentation)

test_getError_DataOverrunError(*args, **kwargs)

source code 
Decorators:
  • @unittest.skip("Temporarily skipped")

test_getError_FrameError(*args, **kwargs)

source code 
Decorators:
  • @unittest.skip("Temporarily skipped")

test_getError_CRCError(*args, **kwargs)

source code 
Decorators:
  • @unittest.skip("Temporarily skipped")

test_setM0Coast(*args, **kwargs)

source code 
Decorators:
  • @unittest.skip("Skipped, no return values.")

test_setM1Coast(*args, **kwargs)

source code 
Decorators:
  • @unittest.skip("Skipped, no return values.")

test_setM0Speed(*args, **kwargs)

source code 
Decorators:
  • @unittest.skip("Skipped, no return values and no get speed command.")

test_setM1Speed(*args, **kwargs)

source code 
Decorators:
  • @unittest.skip("Skipped, no return values and no get speed command.")