Skip to content

Commit

Permalink
test: improve integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent-laporte-pro committed Jun 13, 2024
1 parent db2a303 commit 9a8b19c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/antares_web_installer/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def install_files(self):

else:
# copy all files from package
copytree(self.source_dir, self.target_dir)
copytree(self.source_dir, self.target_dir, dirs_exist_ok=True)

def copy_files(self):
"""
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def test_run__empty_target(
- The server is correctly started
"""
# Patch the `get_desktop` function according to the current platform
platform = {"nt": "windows", "posix": "linux", "darwin": "darwin"}[os.name]
monkeypatch.setattr(f"pyshortcuts.{platform}.get_desktop", lambda: desktop_dir)
platform = {"nt": "_win32_shell", "posix": "_linux_shell"}[os.name]
monkeypatch.setattr(f"antares_web_installer.shortcuts.{platform}.get_desktop", lambda: desktop_dir)

# Run the application
app = App(source_dir=downloaded_dir, target_dir=program_dir, shortcut=True, launch=True)
Expand Down

0 comments on commit 9a8b19c

Please sign in to comment.