Drop the whole firstTitle index again

This commit is contained in:
Veronica K. B. Olsen
2021-02-01 23:20:07 +01:00
parent cada78ca4d
commit 3baeef4f44
4 changed files with 5 additions and 153 deletions
@@ -567,67 +567,5 @@
259,
3
]
},
"firstTitle": {
"7a992350f3eb6": [
"H1",
"T000001"
],
"8c58a65414c23": [
"H0",
"T000000"
],
"88d59a277361b": [
"H2",
"T000001"
],
"db7e733775d4d": [
"H1",
"T000001"
],
"fb609cd8319dc": [
"H2",
"T000001"
],
"88243afbe5ed8": [
"H3",
"T000001"
],
"f96ec11c6a3da": [
"H3",
"T000001"
],
"846352075de7d": [
"H2",
"T000001"
],
"441420a886d82": [
"H2",
"T000001"
],
"eb103bc70c90c": [
"H3",
"T000001"
],
"f8c0562e50f1b": [
"H3",
"T000001"
],
"47666c91c7ccf": [
"H3",
"T000001"
],
"4c4f28287af27": [
"H1",
"T000001"
],
"2426c6f0ca922": [
"H1",
"T000001"
],
"04468803b92e1": [
"H1",
"T000001"
]
}
}
-53
View File
@@ -591,11 +591,6 @@ def testCoreIndex_ExtractData(nwMinimal, dummyGUI):
assert wC == 16
assert pC == 2
# getFirstTitle
# =============
assert theIndex.getFirstTitle(cHandle) == ["H1", "T000001"]
# Novel Stats
# ===========
@@ -1166,51 +1161,3 @@ def testCoreIndex_CheckTextCounts(dummyGUI):
theIndex._checkTextCounts()
# END Test testCoreIndex_CheckTextCounts
@pytest.mark.core
def testCoreIndex_CheckFirstTitle(dummyGUI):
"""Test the first title checker.
"""
theProject = NWProject(dummyGUI)
theIndex = NWIndex(theProject, dummyGUI)
# Valid Index
theIndex._firstTitle = {
"53b69b83cdafc": ["H1", "T000001"],
"974e400180a99": ["H0", "T000000"],
}
assert theIndex._checkFirstTitles() is None
# Invalid Handle
theIndex._firstTitle = {
"53b69b83cdafc": ["H1", "T000001"],
"h74e400180a99": ["H0", "T000000"],
}
with pytest.raises(KeyError):
theIndex._checkFirstTitles()
# Wrong Length
theIndex._firstTitle = {
"53b69b83cdafc": ["H1", "T000001"],
"974e400180a99": ["H0", "T000000", "stuff"],
}
with pytest.raises(IndexError):
theIndex._checkFirstTitles()
# Wrong Header
theIndex._firstTitle = {
"53b69b83cdafc": ["H1", "T000001"],
"974e400180a99": ["XX", "T000000"],
}
with pytest.raises(ValueError):
theIndex._checkFirstTitles()
# Wrong Title
theIndex._firstTitle = {
"53b69b83cdafc": ["H1", "T000001"],
"974e400180a99": ["H0", "INVALID"],
}
with pytest.raises(ValueError):
theIndex._checkFirstTitles()
# END Test testCoreIndex_CheckFirstTitle