Skip to content

Commit

Permalink
fix: test_profile_save.py: deleted file case implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
bananabr3d committed Mar 14, 2024
1 parent e31ec77 commit f2a717d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Client/test_profile_save.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from Client.profile_save import Profile
import os
from Server.player import Player
from os.path import exists


class TestProfileSave(unittest.TestCase):
Expand All @@ -16,6 +17,8 @@ def setUp(self):
self.profile.delete_all_profiles()

def test_all(self):
if exists(self.profile.path):
os.remove(self.profile.path)
data = [self.player1, self.player2]
self.profile.set_profiles(data)
self.assertEqual(self.profile.get_profiles(), data)
Expand Down

0 comments on commit f2a717d

Please sign in to comment.