Total Complexity | 1 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 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 | # 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 |