test: add config not set case

This commit is contained in:
idubnori
2024-04-10 09:17:29 +09:00
parent 75c4befadf
commit 45176ab893

View File

@ -29,3 +29,12 @@ class TestGitHubOutput:
github_output(output_data, key_name)
assert not os.path.exists(str(tmp_path / 'output'))
def test_github_output_notset(self, monkeypatch, tmp_path):
monkeypatch.setenv('GITHUB_OUTPUT', str(tmp_path / 'output'))
output_data = {'key1': {'value1': 1, 'value2': 2}}
key_name = 'key1'
github_output(output_data, key_name)
assert not os.path.exists(str(tmp_path / 'output'))