tests package
Submodules
tests.datasourcetoolbox module
Created on 2021-07-29
@author: wf
- class tests.datasourcetoolbox.DataSourceTest(methodName='runTest')[source]
Bases:
unittest.case.TestCase
test for EventDataSources
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.
- checkDataSource(eventDataSource: corpus.eventcorpus.EventDataSource, expectedSeries: int, expectedEvents: int, eventSample: Optional[str] = None)[source]
check the given DataSource
- Parameters
eventDataSource (EventDataSource) – the event data source to check
- static getEventSeries(seriesAcronym: str)[source]
Returns the event series as dict of lod (records are categorized into the different data sources)
- Parameters
seriesAcronym – acronym of the series
- Returns
dict of lod
tests.testConfref module
Created on 2021-08-02
@author: wf
- class tests.testConfref.TestConfRef(methodName='runTest')[source]
Bases:
tests.datasourcetoolbox.DataSourceTest
test getting events from Confref http://portal.confref.org as a data source
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.
tests.testCorpusLookup module
Created on 2021-07-26
@author: wf
- class tests.testCorpusLookup.TestCorpusLookup(methodName='runTest')[source]
Bases:
tests.datasourcetoolbox.DataSourceTest
test the event corpus
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.
- configureCorpusLookup(lookup: corpus.lookup.CorpusLookup)[source]
callback to configure the corpus lookup
tests.testCrossRef module
Created on 2021-08-02
@author: wf
- class tests.testCrossRef.TestCrossRef(methodName='runTest')[source]
Bases:
tests.datasourcetoolbox.DataSourceTest
test getting events from CrossRef https://www.crossref.org/ as a data source
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.
- testCrossref_DOI_Lookup()[source]
test crossref API access see https://github.com/WolfgangFahl/ProceedingsTitleParser/issues/28
- testFixUmlauts()[source]
workaround Umlaut issue see https://stackoverflow.com/questions/63486767/how-can-i-get-the-fuseki-api-via-sparqlwrapper-to-properly-report-a-detailed-err
tests.testDblpEvents module
Created on 28.07.2021
@author: wf
- class tests.testDblpEvents.TestDblpEvents(methodName='runTest')[source]
Bases:
tests.datasourcetoolbox.DataSourceTest
test the dblp data source
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.
- classmethod configureCorpusLookup(lookup: corpus.lookup.CorpusLookup)[source]
callback to configure the corpus lookup
tests.testDblpXml module
Created on 2021-01-25
@author: wf
- class tests.testDblpXml.TestDblp(methodName='runTest')[source]
Bases:
tests.datasourcetoolbox.DataSourceTest
test the dblp xml parser and pylodstorage extraction for it
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.
- mock = True
- setUp(debug: bool = False, profile: bool = True, **kwargs)[source]
setUp the test environment
especially the mocking parameter - if mock is False a multi-Gigabyte download might be activated
- testIssue5()[source]
https://github.com/WolfgangFahl/ConferenceCorpus/issues/5
dblp xml parser skips some proceedings titles
tests.testOpenResearch module
Created on 27.07.2021
@author: wf
- class tests.testOpenResearch.TestOREventManager(methodName='runTest')[source]
Bases:
tests.datasourcetoolbox.DataSourceTest
Tests OREventManager
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.
- test_configure()[source]
tests configuring OREventManager with different loading methods to retrieve the records from the source
- class tests.testOpenResearch.TestOREventSeriesManager(methodName='runTest')[source]
Bases:
tests.datasourcetoolbox.DataSourceTest
Tests OREventSeriesManager
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.
- test_configure()[source]
tests configuring OREventManager with different loading methods to retrieve the records from the source
- class tests.testOpenResearch.TestOpenResearch(methodName='runTest')[source]
Bases:
tests.datasourcetoolbox.DataSourceTest
test the access to OpenResearch
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.
- class tests.testOpenResearch.TestOrSMW(methodName='runTest')[source]
Bases:
tests.basetest.BaseTest
tests OrSWM
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.
tests.testSMW module
tests.testStatistics module
Created on 2021-07-31
@author: wf
- class tests.testStatistics.TestStatistics(methodName='runTest')[source]
Bases:
tests.datasourcetoolbox.DataSourceTest
test statistics
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.
tests.testWebScrape module
Created on 2021-07-31
@author: wf
- class tests.testWebScrape.TestWebScrape(methodName='runTest')[source]
Bases:
tests.datasourcetoolbox.DataSourceTest
test getting rdfA based triples from Webpages
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.
tests.testWikiCfp module
Created on 2021-07-31
@author: wf
- class tests.testWikiCfp.TestWikiCFP(methodName='runTest')[source]
Bases:
tests.datasourcetoolbox.DataSourceTest
test WikiCFP data source
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.
tests.testWikiCfpScrape module
Created on 2020-08-20
@author: wf
- class tests.testWikiCfpScrape.TestWikiCFP(methodName='runTest')[source]
Bases:
tests.datasourcetoolbox.DataSourceTest
test events from WikiCFP
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.
- handleError(ex)[source]
handle the given exception
- Parameters
ex (Exception) – the exception to handle
- printDelimiterCount(names)[source]
print the count of the most common used delimiters in the given name list
- testEventScraping()[source]
test scraping the given event
test “This item has been deleted” WikiCFP items
e.g. http://www.wikicfp.com/cfp/servlet/event.showcfp?eventid=3
tests.testWikidata module
Created on 27.07.2021
@author: wf
- class tests.testWikidata.TestWikiData(methodName='runTest')[source]
Bases:
tests.datasourcetoolbox.DataSourceTest
test wiki data access
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.
- testQueryManager()[source]
test named query usage see https://github.com/WolfgangFahl/ConferenceCorpus/issues/45