Skip to content
Snippets Groups Projects
Commit be3d7569 authored by Ashwin Kumar Karnad's avatar Ashwin Kumar Karnad
Browse files

add tests to check creation of the init_file

parent 1ad2c947
No related branches found
No related tags found
1 merge request!83Create init command
......@@ -520,6 +520,21 @@ def test_remove_environment(tmp_path):
# done in test_install_environment_zlib
def test_initialize_environment(tmp_path):
"""Test that init_file is created as expected."""
# test that the init file is created as expected
mod.initialize_environment(tmp_path)
init_file = tmp_path / mod.config_vars["init_file"]
assert init_file.exists()
# test that calling again results in warning and exit code 1
with pytest.raises(SystemExit) as pytest_wrapped_e:
mod.initialize_environment(tmp_path)
assert pytest_wrapped_e.type == SystemExit
assert pytest_wrapped_e.value.code == 1
def test_interface(tmp_path):
"""Test other things (not implemented yet)."""
pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment