(tmp_path)
| 163 | |
| 164 | |
| 165 | def test_run(tmp_path): |
| 166 | with sh.pushd(str(tmp_path)): |
| 167 | dotenv_file = str(tmp_path / ".env") |
| 168 | with open(dotenv_file, "w") as f: |
| 169 | f.write("a=b") |
| 170 | |
| 171 | result = sh.dotenv("run", "printenv", "a") |
| 172 | |
| 173 | assert result == "b\n" |
| 174 | |
| 175 | |
| 176 | def test_run_with_existing_variable(tmp_path): |