Add bdd tests for jrnl installation (#1513)

* Added bdd tests for jrnl installation
This commit is contained in:
Kevin 2022-06-25 12:47:05 -07:00 committed by GitHub
parent 23bc0f2c8f
commit 8b955ef002
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 95 additions and 1 deletions

View file

@ -147,3 +147,10 @@ def parse_output_as_language(cli_run, language_name):
assert False, f"Language name {language_name} not recognized"
return {"lang": language_name, "obj": parsed_output}
@given(parse('the home directory is called "{home_dir}"'))
def home_directory(temp_dir, home_dir, monkeypatch):
home_path = os.path.join(temp_dir.name, home_dir)
monkeypatch.setenv("USERPROFILE", home_path) # for windows
monkeypatch.setenv("HOME", home_path) # for *nix