MCPcopy Create free account
hub / github.com/catboost/catboost / TScopedEnvironment

Method TScopedEnvironment

library/cpp/testing/common/scope.h:13–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11 // @note if there was no env variable with given name, it will be set to empty string upon destruction IGNIETFERRO-1486
12 struct TScopedEnvironment {
13 TScopedEnvironment(const TString& name, const TString& value)
14 : PreviousState{1, {name, ::GetEnv(name)}}
15 {
16 ::SetEnv(name, value);
17 }
18
19 TScopedEnvironment(const TVector<std::pair<TString, TString>>& vars)
20 : PreviousState(Reserve(vars.size()))

Callers

nothing calls this directly

Calls 5

SetEnvFunction · 0.85
ReserveFunction · 0.85
GetEnvFunction · 0.50
sizeMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected