MCPcopy Create free account
hub / github.com/theskumar/python-dotenv / test_set_export

Function test_set_export

tests/test_cli.py:132–139  ·  view source on GitHub ↗
(cli, dotenv_file, export_mode, variable, value, expected)

Source from the content-addressed store, hash-verified

130 )
131)
132def test_set_export(cli, dotenv_file, export_mode, variable, value, expected):
133 result = cli.invoke(
134 dotenv_cli,
135 ["--file", dotenv_file, "--quote", "always", "--export", export_mode, "set", variable, value]
136 )
137
138 assert (result.exit_code, result.output) == (0, "{}={}\n".format(variable, value))
139 assert open(dotenv_file, "r").read() == expected
140
141
142def test_set_non_existent_file(cli):

Callers

nothing calls this directly

Calls 1

readMethod · 0.80

Tested by

no test coverage detected