Skip to content

Commit

Permalink
Fix Windows CI (#2897)
Browse files Browse the repository at this point in the history
* Use os.replace instead of os.rename

* Use shutil.move instead

* Fix cov report generation
  • Loading branch information
Ace314159 authored Apr 2, 2022
1 parent 1fd2026 commit 581d97d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: poetry install --no-interaction
- name: Test with pytest
working-directory: ${{ github.workspace }}
run: poetry run pytest --cov-config=.coveragerc --cov-report=xml tests/
run: poetry run pytest --cov-config=.coveragerc --cov=swaglyrics --cov-report=xml tests/
- name: Large Scale Stripper Test Suite
if: matrix.special
working-directory: ${{ github.workspace }}
Expand Down
4 changes: 2 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Contains unit tests for cli.py
"""
import os
import shutil
import unittest

import requests
Expand Down Expand Up @@ -85,7 +85,7 @@ def test_that_lyrics_do_not_break_with_file_not_found(self, fake_get_lyrics):
test that lyrics function does not break if unsupported.txt is not found
"""
fake_get_lyrics.return_value = None
os.rename(unsupported_txt, "unsupported2.txt")
shutil.move(unsupported_txt, "unsupported2.txt")
resp = lyrics("Pixel2XL", "Elgoog", False)
self.assertEqual(resp, "Couldn't get lyrics for Pixel2XL by Elgoog.\n")

Expand Down

0 comments on commit 581d97d

Please sign in to comment.