1 Commits

Author SHA1 Message Date
cclecle
82f8feb884 fix unittest import for coverage 2023-07-23 14:48:29 +01:00

View File

@@ -14,32 +14,32 @@ from contextlib import redirect_stdout, redirect_stderr
print(__name__)
print(__package__)
from src import sotffixcompanions
from src.sotffixcompanions import SOTFSaveThune, __version__, SOTFSaveThune_Exception_SaveNotFound
testdir_path = Path(__file__).parent.resolve()
class TestSOTF(unittest.TestCase):
def test_version(self):
self.assertNotEqual(sotffixcompanions.__version__, "?.?.?")
self.assertNotEqual(__version__, "?.?.?")
def test_SOTFSaveThune_searchlastsave(self):
testSOTF = sotffixcompanions.SOTFSaveThune(testdir_path / "testfiles" / "Saves")
testSOTF = 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 = SOTFSaveThune(testdir_path / "testfiles" / "NoSaves")
with self.assertRaises(SOTFSaveThune_Exception_SaveNotFound):
testSOTF.open_last_save()
def test_SOTFSaveThune_openlastsave(self):
testSOTF = sotffixcompanions.SOTFSaveThune(testdir_path / "testfiles" / "Saves")
testSOTF = SOTFSaveThune(testdir_path / "testfiles" / "Saves")
testSOTF.open_last_save()
def test_SOTFSaveThune_resuscitate_kelvin(self):
testSOTF = sotffixcompanions.SOTFSaveThune(testdir_path / "testfiles" / "Saves")
testSOTF = SOTFSaveThune(testdir_path / "testfiles" / "Saves")
testSOTF.resuscitate_kelvin()
def test_SOTFSaveThune_resuscitate_virginia(self):
testSOTF = sotffixcompanions.SOTFSaveThune(testdir_path / "testfiles" / "Saves")
testSOTF = SOTFSaveThune(testdir_path / "testfiles" / "Saves")
testSOTF.resuscitate_virginia()