Passed
Push — develop ( e76d2d...088138 )
by Jace
01:20
created

coveragespace.services.detected()   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
ccs 0
cts 0
cp 0
crap 2
1
"""Utilities to detect when this program is running on external services."""
2
3 1
import os
4
5
6 1
CONTINUOUS_INTEGRATION = [
7
8
    # General
9
    'CI',
10
    'CONTINUOUS_INTEGRATION',
11
    'DISABLE_COVERAGE',
12
13
    # Travis CI
14
    'TRAVIS',
15
16
    # Appveyor
17
    'APPVEYOR',
18
19
    # CircleCI
20
    'CIRCLECI',
21
22
    # Drone
23
    'DRONE',
24
25 1
]
26 1
27
28
def detected():
29
    return any(name in CONTINUOUS_INTEGRATION for name in os.environ)
30