mirror of
https://github.com/loot/libloot-python.git
synced 2026-07-27 14:14:13 -07:00
Fix non-static version string functions
This commit is contained in:
+2
-2
@@ -103,14 +103,14 @@ PYBIND11_PLUGIN(loot_api) {
|
||||
.def_readonly_static("minor", &LootVersion::minor)
|
||||
.def_readonly_static("patch", &LootVersion::patch)
|
||||
.def_readonly_static("revision", &LootVersion::revision)
|
||||
.def("string", LootVersion::string);
|
||||
.def_static("string", LootVersion::string);
|
||||
|
||||
class_<WrapperVersion>(module, "WrapperVersion")
|
||||
.def_readonly_static("major", &WrapperVersion::major)
|
||||
.def_readonly_static("minor", &WrapperVersion::minor)
|
||||
.def_readonly_static("patch", &WrapperVersion::patch)
|
||||
.def_readonly_static("revision", &WrapperVersion::revision)
|
||||
.def("string", WrapperVersion::string);
|
||||
.def_static("string", WrapperVersion::string);
|
||||
|
||||
class_<DatabaseInterface, std::shared_ptr<DatabaseInterface>>(module, "DatabaseInterface")
|
||||
.def("load_lists", &DatabaseInterface::LoadLists, arg("masterlist_path"), arg("userlist_path") = emptyString)
|
||||
|
||||
@@ -40,6 +40,7 @@ class TestLootApi(GameFixture):
|
||||
self.assertEqual(Version.minor, 10)
|
||||
self.assertEqual(Version.patch, 0)
|
||||
self.assertNotEqual(Version.revision, u'')
|
||||
self.assertEqual(Version.string(), "0.10.0")
|
||||
|
||||
def test_wrapper_version(self):
|
||||
self.assertEqual(WrapperVersion.major, 1)
|
||||
@@ -47,6 +48,7 @@ class TestLootApi(GameFixture):
|
||||
self.assertEqual(WrapperVersion.patch, 0)
|
||||
self.assertNotEqual(WrapperVersion.revision, u'')
|
||||
self.assertNotEqual(WrapperVersion.revision, Version.revision)
|
||||
self.assertEqual(WrapperVersion.string(), "1.0.0")
|
||||
|
||||
def test_create_db(self):
|
||||
db = create_database(GameType.tes4, self.game_path, self.local_path)
|
||||
|
||||
Reference in New Issue
Block a user