~ubuntu-branches/ubuntu/saucy/jockey/saucy

« back to all changes in this revision

Viewing changes to tests/sandbox.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2011-11-25 14:32:50 UTC
  • Revision ID: package-import@ubuntu.com-20111125143250-3420kburqqcg8iqp
Tags: 0.9.5-0ubuntu6
* Merge from trunk:
  - tests/detection.py: Make OpenPrinting.org test case robust against minor
    version changes
  - get_handlers(): Ignore handler classes which start with a "_". These can
    be used to mark private base classes and avoid error messages.
* tests/oslib.py: Fix MockPackage to have an architecture() method, now
  needed by the Apt implementation.
* data/handlers/nvidia.py: Prefix base class with '_' to avoid error
  messages and failing the "shipped_handlers" tests.
* Add debian/tests/control and debian/tests/upstream-system:
  DEP-8/autopkgtest control file for running the upstream tests against the
  installed system Jockey package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1358
1358
            description='Test suite: non-detectable kernel module')
1359
1359
'''
1360
1360
 
 
1361
 
1361
1362
# complete .py file contents with above three handlers
1362
1363
h_availability_py = 'import jockey.handlers\n%s\n%s\n%s\n' % (
1363
1364
    h_avail_mod, h_notavail_mod, h_nodetectmod)
1392
1393
        return True
1393
1394
'''
1394
1395
 
 
1396
h_privateclass_py = '''
 
1397
import jockey.handlers
 
1398
 
 
1399
class _MyHandlerBase(jockey.handlers.KernelModuleHandler):
 
1400
    def __init__(self, ui, param):
 
1401
        jockey.handlers.KernelModuleHandler.__init__(self, ui, 'spam',
 
1402
            description='Test suite: private base class')
 
1403
        self.param = param
 
1404
    def available(self):
 
1405
        return True
 
1406
 
 
1407
class MyHandler(_MyHandlerBase):
 
1408
    def __init__(self, ui):
 
1409
        _MyHandlerBase.__init__(self, ui, 'foo')
 
1410
'''
 
1411
 
1395
1412
#-------------------------------------------------------------------#
1396
1413
# other globals
1397
1414