Skip to content

Commit

Permalink
Update local_test_installation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
th3w1zard1 committed Nov 6, 2023
1 parent 0e6cd8b commit 1508560
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/extract/local_test_installation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import os
import pathlib
import sys
from unittest import TestCase
import unittest

if not getattr(sys, "frozen", False):
thisfile_path = pathlib.Path(__file__).resolve()
project_root = thisfile_path.parents[2]
if project_root.joinpath("pykotor").exists():
sys.path.append(str(project_root))

from pykotor.common.language import LocalizedString
from pykotor.common.misc import Game
Expand All @@ -9,7 +18,6 @@
from pykotor.resource.type import ResourceType
from pykotor.tools.path import Path, locate_game_paths


class TestInstallation(TestCase):
def setUp(self) -> None:
path = os.environ.get("K1_PATH")
Expand Down Expand Up @@ -381,3 +389,7 @@ def test_strings(self):
self.assertEqual("default text", results[locstring1])
self.assertEqual("Some text.", results[locstring2])
self.assertEqual("ERROR: FATAL COMPILER ERROR", results[locstring3])


if __name__ == "__main__":
unittest.main()

0 comments on commit 1508560

Please sign in to comment.