forked from ManageIQ/integration_tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconftest.py
More file actions
96 lines (79 loc) · 2.46 KB
/
conftest.py
File metadata and controls
96 lines (79 loc) · 2.46 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
88
89
90
91
92
93
94
95
96
"""
Top-level conftest.py does a couple of things:
1) Add cfme_pages repo to the sys.path automatically
2) Load a number of plugins and fixtures automatically
"""
import pytest
@pytest.mark.tryfirst
def pytest_addoption(parser):
# Create the cfme option group for use in other plugins
parser.getgroup('cfme', 'cfme: options related to cfme/miq appliances')
def pytest_collection_finish(session):
from fixtures.pytest_store import store
store.terminalreporter.write(
"Uncollection Stats:\n", bold=True)
for reason, value in store.uncollection_stats.iteritems():
store.terminalreporter.write(
" {}: {}\n".format(reason, value), bold=True)
store.terminalreporter.write(
" {} tests left after all uncollections\n".format(len(session.items)), bold=True)
pytest_plugins = (
'markers',
'fixtures.pytest_store',
'cfme.test_framework.sprout.plugin',
'cfme.test_framework.appliance_police',
'fixtures.portset',
'markers.manual',
'markers.polarion', # before artifactor
'fixtures.artifactor_plugin',
'fixtures.parallelizer',
'fixtures.prov_filter',
'fixtures.appliance',
'fixtures.single_appliance_sprout',
'fixtures.dev_branch',
'fixtures.events',
'fixtures.appliance_update',
'fixtures.blockers',
'fixtures.browser',
'fixtures.cfme_data',
'fixtures.datafile',
'fixtures.fixtureconf',
'fixtures.log',
'fixtures.maximized',
'fixtures.merkyl',
'fixtures.nelson',
'fixtures.node_annotate',
'fixtures.page_screenshots',
'fixtures.perf',
'fixtures.provider',
'fixtures.qa_contact',
'fixtures.randomness',
'fixtures.rbac',
'fixtures.screenshots',
'fixtures.soft_assert',
'fixtures.ssh_client',
'fixtures.templateloader',
'fixtures.terminalreporter',
'fixtures.ui_coverage',
'fixtures.version_file',
'fixtures.video',
'fixtures.virtual_machine',
'fixtures.widgets',
'fixtures.xunit_tools',
'markers',
'cfme.fixtures.base',
'cfme.fixtures.cli',
'cfme.fixtures.pytest_selenium',
'cfme.fixtures.configure_auth_mode',
'cfme.fixtures.rdb',
'cfme.fixtures.rest_api',
'cfme.fixtures.service_fixtures',
'cfme.fixtures.smtp',
'cfme.fixtures.tag',
'cfme.fixtures.vm_name',
'cfme.fixtures.vporizer',
'cfme.metaplugins',
)
# work around pytest bug
# https://github.com/pytest-dev/pytest/issues/2353
pytest.register_assert_rewrite(*pytest_plugins)