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

Function ReInitializeContext

library/cpp/testing/common/ut/env_ut.cpp:92–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90#endif
91
92TString ReInitializeContext(TStringBuf data) {
93 auto tmpDir = ::GetSystemTempDir();
94 auto filename = tmpDir + "/context.json";
95 TOFStream stream(filename);
96 stream.Write(data.data(), data.size());
97 stream.Finish();
98
99 NTesting::TScopedEnvironment contextGuard("YA_TEST_CONTEXT_FILE", filename);
100 Singleton<NPrivate::TTestEnv>()->ReInitialize();
101
102 return filename;
103}
104
105TEST(Runtime, GetTestParam) {
106 TString context = R"json({

Callers 1

TESTFunction · 0.85

Calls 6

GetSystemTempDirFunction · 0.85
ReInitializeMethod · 0.80
WriteMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
FinishMethod · 0.45

Tested by

no test coverage detected