cjklib.test.build — Unit tests for build

Unit tests for cjklib.build.builder.

Classes

class cjklib.test.build.BIG5HKSCSSetBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of BIG5HKSCSSetBuilder
class cjklib.test.build.BIG5SetBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of BIG5SetBuilder
class cjklib.test.build.CEDICTBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CEDICTBuilder
class cjklib.test.build.CEDICTGRBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CEDICTGRBuilder
class cjklib.test.build.CEDICTGRWordIndexBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CEDICTGRWordIndexBuilder
class cjklib.test.build.CEDICTWordIndexBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CEDICTWordIndexBuilder
class cjklib.test.build.CFDICTBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CFDICTBuilder
class cjklib.test.build.CFDICTWordIndexBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CFDICTWordIndexBuilder
class cjklib.test.build.CantoneseIPAInitialFinalBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CantoneseIPAInitialFinalBuilder
class cjklib.test.build.CantoneseYaleInitialNucleusCodaBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CantoneseYaleInitialNucleusCodaBuilder
class cjklib.test.build.CantoneseYaleSyllablesBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CantoneseYaleSyllablesBuilder
class cjklib.test.build.CharacterComponentLookupBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterComponentLookupBuilder
class cjklib.test.build.CharacterDecompositionBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterDecompositionBuilder
class cjklib.test.build.CharacterHDZReadingBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterHDZReadingBuilder
class cjklib.test.build.CharacterHangulBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterHangulBuilder
class cjklib.test.build.CharacterJapaneseKunBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterJapaneseKunBuilder
class cjklib.test.build.CharacterJapaneseOnBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterJapaneseOnBuilder
class cjklib.test.build.CharacterJapaneseRadicalBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterJapaneseRadicalBuilder
class cjklib.test.build.CharacterJyutpingBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterJyutpingBuilder
class cjklib.test.build.CharacterKanWaRadicalBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterKanWaRadicalBuilder
class cjklib.test.build.CharacterKangxiRadicalBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterKangxiRadicalBuilder
class cjklib.test.build.CharacterKoreanRadicalBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterKoreanRadicalBuilder
class cjklib.test.build.CharacterPinyinAdditionalBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterPinyinAdditionalBuilder
class cjklib.test.build.CharacterPinyinBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterPinyinBuilder
class cjklib.test.build.CharacterRadicalStrokeCountBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterRadicalStrokeCountBuilder
class cjklib.test.build.CharacterResidualStrokeCountBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterResidualStrokeCountBuilder
class cjklib.test.build.CharacterUnihanPinyinBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterUnihanPinyinBuilder
class cjklib.test.build.CharacterVariantBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterVariantBuilder
removeMySQL(databaseUrls)
class cjklib.test.build.CharacterVietnameseBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterVietnameseBuilder
class cjklib.test.build.CharacterXHCReadingBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterXHCReadingBuilder
class cjklib.test.build.CharacterXHPCReadingBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterXHPCReadingBuilder
class cjklib.test.build.CombinedCharacterResidualStrokeCountBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CombinedCharacterResidualStrokeCountBuilder
class cjklib.test.build.CombinedStrokeCountBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CombinedStrokeCountBuilder
class cjklib.test.build.DatabaseBuilder(**options)

DatabaseBuilder provides the main class for building up a database for the cjklib package.

It contains all TableBuilder classes and a dependency graph to handle build requests.

To modify the behaviour of TableBuilder instances, global or local options can be specified, see getBuilderOptions().

Parameters:
  • databaseUrl – database connection setting in the format driver://user:pass@host/database.
  • dbConnectInst – instance of a DatabaseConnector
  • dataPath – optional list of paths to the data file(s)
  • quiet – if True no status information will be printed to stderr
  • rebuildDepending – if True existing tables that depend on updated tables will be dropped and built from scratch
  • rebuildExisting – if True existing tables will be dropped and built from scratch
  • noFail – if True build process won’t terminate even if one table fails to build
  • prefer – list of TableBuilder names to prefer in conflicting cases
  • additionalBuilders – list of externally provided TableBuilders
Raises ValueError:
 

if two different options from two different builder collide.

build(tables)

Builds the given tables.

Parameter:tables (list) – list of tables to build
Raises IOError:if a table builder fails to read its data; only if noFail is set to False
clearTemporary()
Removes all tables only built temporarily as to satisfy build dependencies. This method is called before build() terminates. If the build process is interruptes (e.g. by the user pressing Ctrl+C), this method should be called as to make sure that these temporary tables are removed and not included in later builds.
static getBuildDependencyOrder(tableBuilderClasses)

Create order in which the tables have to be created.

Parameter:tableBuilderClasses (list of classobj) – list of TableBuilder classes
Return type:list of classobj
Returns:the given classes ordered in build dependency order
getBuildDependentTables(tableNames)

Gets the name of the tables that needs to be built to resolve dependencies.

Parameter:tableNames (list of str) – list of tables to build
Return type:list of str
Returns:names of tables needed to resolve dependencies
getBuilderOptions(builderClass, ignoreUnknown=False)

Gets a dictionary of options for the given builder that were specified to the DatabaseBuilder.

Options included are global options understood by the builder (e.g. 'dataPath') or local options given in the formats '--BuilderClassName-option' or '--TableName-option'. For example '--Unihan-wideBuild' sets the option 'wideBuild' for all builders providing the Unihan table. '--BuilderClassName-option' has precedence over '--TableName-option'.

Parameters:
  • builderClass (classobj) – TableBuilder class
  • ignoreUnknown (bool) – if set to True unknown options will be ignored, otherwise a ValueError is raised.
Return type:

dict

Returns:

dictionary of options for the given table builder.

Raises ValueError:
 

if unknown option is specified and ignoreUnknown is False

getClassesInBuildOrder(tableNames)

Gets the build order for the given table names.

Parameter:tableNames (list of str) – list of names of tables to build
Return type:list of classobj
Returns:TableBuilder classes in build order
Raises UnsupportedError:
 if an unsupported table is given.
getCurrentSupportedTables()

Gets names of tables supported by this instance of the database builder.

This list can have more entries then getSupportedTables() as additional external builders can be supplied on instantiation.

Return type:list of str
Returns:names of tables
getDependingTables(tableNames)

Gets the name of the tables that depend on the given tables to be built and are not included in the given set.

Dependencies depend on the choice of table builders and thus may vary.

Parameter:tableNames (list of str) – list of tables
Return type:list of str
Returns:names of tables that depend on given tables
getExternalRebuiltDependingTables(tableNames)

Gets the name of the tables that depend on the given tables to be built and already exist similar to getRebuiltDependingTables() but only for tables of attached databases.

Parameter:tableNames (list of str) – list of tables
Return type:list of str
Returns:names of tables of attached databsaes that need to be rebuilt because of dependencies
getRebuiltDependingTables(tableNames)

Gets the name of the tables that depend on the given tables to be built and already exist, thus need to be rebuilt.

Parameter:tableNames (list of str) – list of tables
Return type:list of str
Returns:names of tables that need to be rebuilt because of dependencies
static getSupportedTables()

Gets names of supported tables.

Return type:list of str
Returns:names of tables
getTableBuilder(tableName)

Gets the TableBuilder used by this instance of the database builder to build the given table.

Parameter:tableName (str) – name of table
Return type:classobj
Returns:TableBuilder used to build the given table by this build instance.
Raises UnsupportedError:
 if an unsupported table is given.
static getTableBuilderClasses(preferClassNameSet=None, resolveConflicts=True, quiet=True, additionalBuilders=None)

Gets all classes in module that implement TableBuilder.

Parameters:
  • preferClassNameSet (list of str) – list of TableBuilder class names that will be preferred in conflicting cases, resolveConflicting must be True to take effect (default)
  • resolveConflicts (bool) – if true conflicting builders will be removed so that only one builder is left per Table.
  • quiet (bool) – if True no status information will be printed to stderr
  • additionalBuilders (list of classobj) – list of externally provided TableBuilders
Return type:

set

Returns:

list of all classes inheriting form TableBuilder that provide a table (i.d. non abstract implementations), with its name as key

Raises ValueError:
 

if two builders are preferred that provide the same table, if two different options with the same name collide

isOptimizable()

Checks if the current database supports optimization.

Return type:boolean
Returns:True if optimizable, False otherwise
needsRebuild(tableName)

Returns True if either rebuild is turned on by default or the table does not exist yet in any of the databases.

Parameter:tableName (str) – table name
Return type:bool
Returns:True, if table needs to be rebuilt
optimize()

Optimizes the current database.

Raises Exception:
 if database does not support optimization
Raises OperationalError:
 if optimization failed
remove(tables)

Removes the given tables from the main database.

Parameter:tables (list) – list of tables to remove
Raises UnsupportedError:
 if an unsupported table is given.
Return type:list
Returns:names of deleted tables, might be smaller than the actual list
static resolveBuilderConflicts(classList, preferClassNames=None, quiet=True)

Returns a subset of TableBuilder classes so that every buildable table is only represented by exactly one builder.

Parameters:
  • classList (list of classobj) – list of TableBuilders
  • preferClassNames (list of classobj) – list of TableBuilder class names that will be preferred in conflicting cases
  • quiet (bool) – if True no status information will be printed to stderr
Return type:

list of classobj

Returns:

mapping of table names to builder classes that provide the given table

Raises ValueError:
 

if two builders are preferred that provide the same table

setBuilderOptions(builderClass, options, exclusive=False)

Sets the options for the given builder that were specified.

Parameters:
  • builderClass (classobj) – TableBuilder class
  • options (dict) – dictionary of options for the given table builder.
  • exclusive (bool) – if set to True unspecified options will be set to the default value.
Raises ValueError:
 

if unknown option is specified

class cjklib.test.build.EDICTBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of EDICTBuilder
class cjklib.test.build.EDICTWordIndexBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of EDICTWordIndexBuilder
class cjklib.test.build.GB2312SetBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of GB2312SetBuilder
class cjklib.test.build.GRAbbreviationBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of GRAbbreviationBuilder
class cjklib.test.build.GRRhotacisedFinalsBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of GRRhotacisedFinalsBuilder
class cjklib.test.build.GRSyllablesBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of GRSyllablesBuilder
class cjklib.test.build.GlyphBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of GlyphBuilder
class cjklib.test.build.GlyphInformationSetBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of GlyphInformationSetBuilder
class cjklib.test.build.HKSCSSetBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of HKSCSSetBuilder
class cjklib.test.build.HanDeDictBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of HanDeDictBuilder
class cjklib.test.build.HanDeDictWordIndexBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of HanDeDictWordIndexBuilder
class cjklib.test.build.IICoreSetBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of IICoreSetBuilder
class cjklib.test.build.JISX0208SetBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of JISX0208SetBuilder
class cjklib.test.build.JISX0208_0213SetBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of JISX0208_0213SetBuilder
class cjklib.test.build.JISX0213SetBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of JISX0213SetBuilder
class cjklib.test.build.JyutpingIPAMappingBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of JyutpingIPAMappingBuilder
class cjklib.test.build.JyutpingInitialFinalBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of JyutpingInitialFinalBuilder
class cjklib.test.build.JyutpingSyllablesBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of JyutpingSyllablesBuilder
class cjklib.test.build.JyutpingYaleMappingBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of JyutpingYaleMappingBuilder
class cjklib.test.build.KangxiRadicalBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of KangxiRadicalBuilder
class cjklib.test.build.KangxiRadicalIsolatedCharacterBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of KangxiRadicalIsolatedCharacterBuilder
class cjklib.test.build.Kanjidic2BuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of Kanjidic2Builder
removeMySQL(databaseUrls)
class cjklib.test.build.LocaleCharacterGlyphBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of LocaleCharacterGlyphBuilder
class cjklib.test.build.MandarinBraileFinalBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of MandarinBraileFinalBuilder
class cjklib.test.build.MandarinBraileInitialBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of MandarinBraileInitialBuilder
class cjklib.test.build.MandarinIPAInitialFinalBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of MandarinIPAInitialFinalBuilder
class cjklib.test.build.MysqlCharacterVariantBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of CharacterVariantBuilder
filterMySQL(databaseUrls)
class cjklib.test.build.MysqlKanjidic2BuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of Kanjidic2Builder
filterMySQL(databaseUrls)
class cjklib.test.build.MysqlUnihanBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of UnihanBuilder
filterMySQL(databaseUrls)
class cjklib.test.build.PinyinGRMappingBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of PinyinGRMappingBuilder
class cjklib.test.build.PinyinIPAMappingBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of PinyinIPAMappingBuilder
class cjklib.test.build.PinyinInitialFinalBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of PinyinInitialFinalBuilder
class cjklib.test.build.PinyinSyllablesBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of PinyinSyllablesBuilder
class cjklib.test.build.RadicalEquivalentCharacterBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of RadicalEquivalentCharacterBuilder
class cjklib.test.build.StrokeCountBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of StrokeCountBuilder
class cjklib.test.build.StrokeOrderBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of StrokeOrderBuilder
class cjklib.test.build.StrokesBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of StrokesBuilder
class cjklib.test.build.TableBuilderTest

Base class for testing of TableBuilder classes.

BUILDER
Builder class object.
DATABASES

Databases to test.

MySQL by default is disabled. Run the following as admin before you enable it: CREATE DATABASE cjklib_unittest DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; You might need to give appropriate rights to the user: GRANT ALL ON cjklib_unittest.* TO 'user_name'@'host_name‘;

EXTERNAL_DATA_PATHS
Data paths for external files.
OPTIONS
Sets of options for the builder.
PREFER_BUILDERS
Builders of depending tables to prefer.
TABLE_DEPEND_OPTIONS
Tuples of options for other builders the current tested builder depends on.
setUp()
shortDescription()
tearDown()
testBuild()
Test if build finishes successfully.
class cjklib.test.build.UnihanBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of UnihanBuilder
removeMySQL(databaseUrls)
class cjklib.test.build.UnihanStrokeCountBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of UnihanStrokeCountBuilder
class cjklib.test.build.VersionBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of VersionBuilder
class cjklib.test.build.WadeGilesInitialFinalBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of WadeGilesInitialFinalBuilder
class cjklib.test.build.WadeGilesPinyinMappingBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of WadeGilesPinyinMappingBuilder
class cjklib.test.build.WadeGilesSyllablesBuilderTest(methodName='runTest')

Bases: cjklib.test.build.TableBuilderTest, unittest.TestCase

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.

BUILDER
alias of WadeGilesSyllablesBuilder

Table Of Contents

Previous topic

cjklib.test — Unit tests

Next topic

cjklib.test.characterlookup — Unit tests for characterlookup

This Page