Package portage :: Package tests
[hide private]

Package tests

source code

Submodules [hide private]

Classes [hide private]
  TextTestResult
We need a subclass of unittest._TextTestResult to handle tests with TODO
  TestCase
We need a way to mark a unit test as "ok to fail" This way someone can add a broken test and mark it as failed and then fix the code later.
  TextTestRunner
We subclass unittest.TextTestRunner to output SKIP for tests that fail but are skippable
Functions [hide private]
 
main() source code
 
my_import(name) source code
 
getTestFromCommandLine(args, base_path) source code
 
getTestDirs(base_path) source code
 
getTestNames(path) source code
 
getTestsFromFiles(path, base_path, files) source code
 
getTests(path, base_path)
path is the path to a given subdir ( 'portage/' for example) This does a simple filter on files in that dir to give us modules to import
source code
Variables [hide private]
  test_cps = ['sys-apps/portage', 'virtual/portage']
  test_versions = ['1.0', '1.0-r1', '2.3_p4', '1.0_alpha57']
  test_slots = [None, '1', 'gentoo-sources-2.6.17', 'spankywashe...
  test_usedeps = ['foo', '-bar', ('foo', 'bar'), ('foo', '-bar')...
  __package__ = 'portage.tests'

Imports: sys, time, unittest, _TextTestResult, portage, os, _encodings, _unicode_decode, ArgumentParser


Variables Details [hide private]

test_slots

Value:
[None, '1', 'gentoo-sources-2.6.17', 'spankywashere']

test_usedeps

Value:
['foo', '-bar', ('foo', 'bar'), ('foo', '-bar'), ('foo?', '!bar?')]