tethne.tests package¶
Submodules¶
tethne.tests.test_analyze_corpus module¶
-
class
tethne.tests.test_analyze_corpus.
TestBurstness
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
tethne.tests.test_analyze_features module¶
-
class
tethne.tests.test_analyze_features.
TestAngularSimilarity
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
tethne.tests.test_analyze_graph module¶
tethne.tests.test_classes_corpus module¶
tethne.tests.test_classes_feature module¶
-
class
tethne.tests.test_classes_feature.
TestFeature
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_classes_feature.
TestFeatureSet
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
test_end_to_end
()[source]¶ Runs the Gensim LDA workflow (https://radimrehurek.com/gensim/wiki.html#latent-dirichlet-allocation).
-
test_end_to_end_raw
()[source]¶ Runs the Gensim LDA workflow (https://radimrehurek.com/gensim/wiki.html#latent-dirichlet-allocation).
-
tethne.tests.test_classes_graphcollection module¶
-
class
tethne.tests.test_classes_graphcollection.
TestGraphCollectionCreation
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
test_add
()[source]¶ Add a networkx.Graph to the
GraphCollection
.
-
test_index
()[source]¶ Index a networkx.Graph, but don’t add it to the
GraphCollection
.
-
-
class
tethne.tests.test_classes_graphcollection.
TestGraphCollectionMethods
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
test_edges
()[source]¶ GraphCollection.edges()
should behave likenetworkx.Graph.edges()
, but return values for all of the networkx.Graphs in theGraphCollection
.
-
test_getattr
()[source]¶ Can retrieve a graph as an attribute of the
GraphCollection
.
-
test_nodes
()[source]¶ GraphCollection.nodes()
should behave likenetworkx.Graph.nodes()
, but return values for all of the networkx.Graphs in theGraphCollection
.
-
test_order
()[source]¶ GraphCollection.order()
should return the number of nodes in theGraphCollection
. If piecewise is True, should return a dict containing the order of each networkx.Graph in theGraphCollection
.
-
test_size
()[source]¶ GraphCollection.size()
should return the number of nodes in theGraphCollection
. If piecewise is True, should return a dict containing the size of each networkx.Graph in theGraphCollection
.
-
tethne.tests.test_classes_streamingcorpus module¶
tethne.tests.test_classes_structuredfeature module¶
-
class
tethne.tests.test_classes_structuredfeature.
TestStructuredFeature
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_classes_structuredfeature.
TestStructuredFeatureSet
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_classes_structuredfeature.
TestStructuredFeatureSetToGensim
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
test_end_to_end
()[source]¶ Runs the Gensim LDA workflow (https://radimrehurek.com/gensim/wiki.html#latent-dirichlet-allocation).
-
test_end_to_end_raw
()[source]¶ Runs the Gensim LDA workflow (https://radimrehurek.com/gensim/wiki.html#latent-dirichlet-allocation).
-
tethne.tests.test_model_social_tapmodel module¶
tethne.tests.test_models_lda module¶
-
class
tethne.tests.test_models_lda.
TestHelpers
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_models_lda.
TestLDAModel
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_models_lda.
TestLDAModelExistingOutput
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_models_lda.
TestLDAModelMALLETPath
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
tethne.tests.test_networks_authors module¶
Bases:
unittest.case.TestCase
Bases:
unittest.case.TestCase
tethne.tests.test_networks_base module¶
-
class
tethne.tests.test_networks_base.
TestBaseNetworkMethods
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
tethne.tests.test_networks_features module¶
tethne.tests.test_networks_helpers module¶
-
class
tethne.tests.test_networks_helpers.
TestCitationCount
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_networks_helpers.
TestSimplifyMultigraph
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
test_simplify_multigraph
()[source]¶ PURPOSE :To Test the simplify_Multigraph functionality.
DESCRIPTION : simplify_graph takes as input a multigraph i.e a graph having parallel edges in between 2 vertices/nodes and converts it to a simple graph i.e. with only one edge in between two nodes. And the weight of the new edge is equal to the number of edges that were collapsed.
- TESTED FOR : 1) Collapsed edges between vertices.
- Weight of the new edges
TEST DATA : any Multigraph.
-
tethne.tests.test_networks_papers module¶
tethne.tests.test_readers_base module¶
tethne.tests.test_readers_dfr module¶
-
class
tethne.tests.test_readers_dfr.
TestCitationFile
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_readers_dfr.
TestCreateAyijid
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_readers_dfr.
TestDFRReader
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_readers_dfr.
TestDFRReaderStreaming
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_readers_dfr.
TestDfr2PaperMap
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_readers_dfr.
TestHandleAuthor
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_readers_dfr.
TestHandleAuthors
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
testing the functionality when the input parameter is list
-
class
tethne.tests.test_readers_dfr.
TestHandlePageRange
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
tethne.tests.test_readers_merge module¶
-
class
tethne.tests.test_readers_merge.
TestMerge
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
test_merge_both_empty
()[source]¶ Testing the functionality of merge when both lists passed are empty
-
test_merge_comparator
()[source]¶ Instead of passing a list of fields to compare, we can pass a callable object that returns bool.
-
test_merge_equal
()[source]¶ Testing the functionality of merge by passing two lists with 1 field each and field’s values in both are equal
-
tethne.tests.test_readers_scopus module¶
tethne.tests.test_readers_wos module¶
-
class
tethne.tests.test_readers_wos.
TestWithStarCR
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_readers_wos.
TestWoSParser
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
tethne.tests.test_readers_zotero module¶
-
class
tethne.tests.test_readers_zotero.
TestInferSpaces
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_readers_zotero.
TestZoteroDuplicates
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
test_duplicate_Papers_length
()[source]¶ Tests for user-warning raised in case of duplicate papers in a Corpus. Definition of duplicate papers is : Papers which have the same index_by field value. Example :
Two papers in a Zotero collection, with the same URI, are duplicates Two papers from World of Science with the same WOSID are duplicates
Returns: Fails when the attribute duplicate_papers(Dictionary) is not populated.
duplicate_papers[‘http://www.jstor.org/stable/2460126‘] = 2
This means there are 2 papers with the URI ‘http://www.jstor.org/stable/2460126‘
-
-
class
tethne.tests.test_readers_zotero.
TestZoteroParser
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Tests for empty author names for each paper in a ZOTERO Corpus
Returns: Fails : When the author-name is empty, it fails
Tests for empty author_full names for each paper in a ZOTERO Corpus
Returns: Fails : When the author_full names is empty, it fails.
tethne.tests.test_utilities module¶
-
class
tethne.tests.test_utilities.
TestArgMax
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_utilities.
TestAttribsToString
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_utilities.
TestConcatList
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_utilities.
TestContains
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_utilities.
TestDictFromNode
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
Testing the functionality when there are more than one node of the same type and the resultants values are in propertly obtained in the list and also when there is only node of a type, the resultant is a String
-
class
tethne.tests.test_utilities.
TestGetItem
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_utilities.
TestOverlap
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_utilities.
TestSetItem
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
-
class
tethne.tests.test_utilities.
TestStripPunctual2
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase
tethne.tests.test_writers_collection module¶
tethne.tests.test_writers_corpus module¶
tethne.tests.test_writers_graph module¶
-
class
tethne.tests.test_writers_graph.
CSVTest
(methodName='runTest')[source]¶ Bases:
unittest.case.TestCase