coveragespace.services.detected()   A
last analyzed

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
    # General
8
    'CI',
9
    'CONTINUOUS_INTEGRATION',
10
    'DISABLE_COVERAGE',
11
    # Travis CI
12
    'TRAVIS',
13
    # Appveyor
14
    'APPVEYOR',
15
    # CircleCI
16
    'CIRCLECI',
17
    # Drone
18
    'DRONE',
19
]
20
21
22
def detected():
23
    return any(name in CONTINUOUS_INTEGRATION for name in os.environ)
24