-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_spider.py
More file actions
87 lines (61 loc) · 2.09 KB
/
test_spider.py
File metadata and controls
87 lines (61 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
"""Test suite for spiderexpress.Spider
This is the main application, it should load the config, dispatch jobs and keep
track of its state, handle database connections and manage set up and tear down.
It is loaded by click as soon as the application starts and the configuration
is loaded automatically by the initializer.
"""
# pylint: disable=E1101
from pathlib import Path
from pytest import skip
from spiderexpress.spider import Spider
def test_config_discover():
"""
The config_discover should search all candidate configs so they can be shown in
auto-completion and loaded when selected.
"""
skip()
def test_load_config():
"""should load the config"""
skip()
def test_spider():
"""Should instantiate a spider."""
spider = Spider(auto_transitions=True)
assert spider is not None
assert spider.is_idle()
spider.start(Path("tests/stubs/sevens_grader_random_test.pe.yml"))
assert spider.configuration is not None
assert spider.is_stopped()
assert spider.iteration > 0
def test_spider_with_spikyball():
"""Should instantiate a spider."""
spider = Spider()
assert spider is not None
assert spider.is_idle()
spider.start(Path("tests/stubs/sevens_grader_spikyball_test.pe.yml"))
assert spider.is_stopped()
assert spider.configuration is not None
assert spider.iteration > 0
def test_get_node():
"""
Spider should be able to retrieve node information either from the connected
database or from a web service.
"""
skip()
def test_get_neighbors():
"""
Spider should get a nodes neighbors from the edge table of the connected
database or from a webservice.
"""
skip()
def test_get_strategy():
"""
Spider should be compatible with different network exploration strategies,
e.g. spiky ball or snow ball. Strategies should be configurable via the
config interface and load the appropriate algorithm.
"""
skip()
def test_get_connector():
"""
Spider should be able to handle requesting networks from different social
media platforms or web interfaces.
"""