test_corpuspath
Test the naming scheme of corpus files.
name(module, lang, extension, goallang)
Produce a path to a corpus file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
module
|
str
|
module of the corpus file |
required |
lang
|
str
|
language of the corpus file |
required |
extension
|
str
|
extension of the corpus file |
required |
goallang
|
str
|
goallang of tmx file |
required |
Returns:
| Type | Description |
|---|---|
str
|
path to the corpus file |
Source code in corpustools/test/test_corpuspath.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | |
test_path_to_orig(filename)
Check that the corpus file naming scheme works as it should.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
the filename to check |
required |
Raises:
| Type | Description |
|---|---|
AssertionError
|
is raised if the result is not what is expected |
Source code in corpustools/test/test_corpuspath.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | |