Skip to content

Commit

Permalink
♻️ change tests to support XDG_CONFIG_HOME change
Browse files Browse the repository at this point in the history
  • Loading branch information
dryan committed Nov 12, 2024
1 parent 334197c commit f78ff34
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,15 @@ def test_check_without_check_file_path_with_XDG_CONFIG_HOME_set(self):
msg="check_for_updates returns True or False or None when there isn't a check file path and XDG_CONFIG_HOME is set",
)

def test_check_without_check_file_path_with_XDG_CONFIG_HOME_not_set(self):
with patch.dict("os.environ", {"XDG_CONFIG_HOME": None}):
result = d3ploy.check_for_updates(None, "0.0.0")
self.assertIn(
result,
[True, False, None],
msg="check_for_updates returns True or False or None when there isn't a check file path and XDG_CONFIG_HOME is not set",
)


class UploadFileTestCase(
BaseTestCase,
Expand Down

0 comments on commit f78ff34

Please sign in to comment.