MCPcopy Index your code
hub / github.com/requests/requests-oauthlib / run_sample

Method run_sample

tests/examples/base.py:37–48  ·  view source on GitHub ↗
(self, filepath, variables)

Source from the content-addressed store, hash-verified

35 fout.write(line)
36
37 def run_sample(self, filepath, variables):
38 inpath = os.path.join(cwd, "..", "..", "docs", "examples", filepath)
39 outpath = os.path.join(cwd, "tmp_{}".format(filepath))
40 self.replaceVariables(inpath, outpath, variables)
41
42 self.proc = subprocess.Popen(
43 [shutil.which("python"),
44 outpath],
45 text=True, bufsize=1,
46 stdin=subprocess.PIPE,
47 stdout=subprocess.PIPE
48 )
49
50 def write(self, string):
51 self.proc.stdin.write(string)

Callers 1

test_loginMethod · 0.80

Calls 1

replaceVariablesMethod · 0.95

Tested by 1

test_loginMethod · 0.64