Skip to content

Commit

Permalink
changed 'tmp' dir to '__tmp__'
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdallah-Ragab committed Sep 17, 2023
1 parent a732ad2 commit 5ee63f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def test_failed_download_database(self, download_database_mock):

class TestRenameFile(TestCase):
def setUp(self) -> None:
Path('/__tmp__').mkdir(exist_ok=True)
Path('__tmp__').mkdir(exist_ok=True)
return super().setUp()

def tearDown(self):
Expand All @@ -176,13 +176,13 @@ def test_file_not_exist(self):
rename_file(filepath, new_filename)

def test_path_not_file(self):
filepath = '/tmp'
filepath = '/__tmp__'
new_filename = 'new_test_file.xyz'
with self.assertRaises(ValueError, msg="Expected ValueError Exception to be raised when path is not a file"):
rename_file(filepath, new_filename)

def test_rename_file(self):
filepath = '/tmp/test_file.xyz'
filepath = '/__tmp__/test_file.xyz'
new_filename = 'new_test_file.xyz'
new_filepath = Path(filepath).parent / new_filename
Path(filepath).touch()
Expand All @@ -191,7 +191,7 @@ def test_rename_file(self):
self.assertTrue(result.exists(), msg="The renamed file should exist.")

def test_failed_rename_file(self):
filepath = '/tmp/test_file.xyz'
filepath = '/__tmp__/test_file.xyz'
new_filename = 'new_test_file.xyz'
new_filepath = Path(filepath).parent / new_filename
Path(filepath).touch()
Expand Down

0 comments on commit 5ee63f4

Please sign in to comment.