Skip to content

Commit

Permalink
Fixed unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Root-Core committed Jan 9, 2025
1 parent a89786d commit 174cc73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions protonfixes_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ def testGetGameNone(self):
self.assertTrue('SteamGameId' not in os.environ, 'SteamGameId is set')
self.assertTrue('UMU_ID' not in os.environ, 'UMU_ID is set')
self.assertTrue('SteamAppId' not in os.environ, 'SteamAppId is set')
result = func()
self.assertFalse(result, 'None was not returned')
with self.assertRaises(SystemExit):
func()

def testGetStoreNameZoom(self):
"""Pass zoomplatform as store name
Expand Down
5 changes: 3 additions & 2 deletions util.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ def protondir() -> str:
return os.path.dirname(sys.argv[0])


@functools.lru_cache
def protonprefix() -> str:
"""Returns the wineprefix used by proton"""
return os.path.join(os.environ['STEAM_COMPAT_DATA_PATH'], 'pfx/')
"""Returns wineprefix's path used by proton"""
return os.path.join(os.environ.get('STEAM_COMPAT_DATA_PATH', ''), 'pfx/')


def protonnameversion() -> Optional[str]:
Expand Down

0 comments on commit 174cc73

Please sign in to comment.