Completed
Push — develop ( 604c57...dfb4a1 )
by Jace
8s
created

detected()   A

Complexity

Conditions 2

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
dl 0
loc 2
ccs 2
cts 2
cp 1
crap 2
rs 10
c 1
b 0
f 0
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
    # Travis CI
9
    'TRAVIS',
10
11
    # Appveyor
12
    'APPVEYOR',
13
14
    # CircleCI
15
    'CIRCLECI',
16
17
]
18
19
20 1
def detected():
21
    return any(name in CONTINUOUS_INTEGRATION for name in os.environ)
22