Files
sotffixcompanions/test/test_sotffixcompanions.py
2023-07-23 11:04:41 +01:00

46 lines
1.6 KiB
Python

# sotffixcompanions (c) by chacha
#
# sotffixcompanions is licensed under a
# Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Unported License.
#
# You should have received a copy of the license along with this
# work. If not, see <https://creativecommons.org/licenses/by-nc-sa/4.0/>.
import unittest
from io import StringIO
from pathlib import Path
from contextlib import redirect_stdout, redirect_stderr
print(__name__)
print(__package__)
from src import sotffixcompanions
testdir_path = Path(__file__).parent.resolve()
class TestSOTF(unittest.TestCase):
def test_version(self):
self.assertNotEqual(sotffixcompanions.__version__, "?.?.?")
def test_SOTFSaveThune_searchlastsave(self):
testSOTF = sotffixcompanions.SOTFSaveThune(testdir_path / "testfiles\\Saves")
testSOTF.search_last_save()
def test_SOTFSaveThune_SaveNotFound(self):
testSOTF = sotffixcompanions.SOTFSaveThune(testdir_path / "testfiles\\NoSaves")
with self.assertRaises(sotffixcompanions.SOTFSaveThune_Exception_SaveNotFound):
testSOTF.open_last_save()
def test_SOTFSaveThune_openlastsave(self):
testSOTF = sotffixcompanions.SOTFSaveThune(testdir_path / "testfiles\\Saves")
testSOTF.open_last_save()
def test_SOTFSaveThune_resuscitate_kelvin(self):
testSOTF = sotffixcompanions.SOTFSaveThune(testdir_path / "testfiles\\Saves")
testSOTF.resuscitate_kelvin()
def test_SOTFSaveThune_resuscitate_virginia(self):
testSOTF = sotffixcompanions.SOTFSaveThune(testdir_path / "testfiles\\Saves")
testSOTF.resuscitate_virginia()