Skip to content

Commit 9b088f9

Browse files
Don't call XmpParser.initialize
It gets called automatically when Xmp data is loaded. This happens in other test modules, so when test_properties is run it might already be initialised. Calling it a second time can cause segfaults!
1 parent 73fd4ef commit 9b088f9

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

tests/test_properties.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## python-exiv2 - Python interface to libexiv2
22
## http://github.com/jim-easterbrook/python-exiv2
3-
## Copyright (C) 2023-24 Jim Easterbrook [email protected]
3+
## Copyright (C) 2023-25 Jim Easterbrook [email protected]
44
##
55
## This program is free software: you can redistribute it and/or
66
## modify it under the terms of the GNU General Public License as
@@ -31,14 +31,6 @@ class TestPropertiesModule(unittest.TestCase):
3131
prefix_name = 'dc'
3232
property_name = 'description'
3333

34-
@classmethod
35-
def setUpClass(cls):
36-
exiv2.XmpParser.initialize()
37-
38-
@classmethod
39-
def tearDownClass(cls):
40-
exiv2.XmpParser.terminate()
41-
4234
def check_result(self, result, expected_type, expected_value):
4335
self.assertIsInstance(result, expected_type)
4436
self.assertEqual(result, expected_value)

0 commit comments

Comments
 (0)