Skip to content

Commit de22a96

Browse files
committed
0.4.0 rename to pyexiftool and make sure tests pass
1 parent f44e00b commit de22a96

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ Date (Timezone) | Version | Comment
2222
07/19/2019 12:54:39 AM (PDT) | 0.3.3 | Merge a piece of [Pull request #11 "Robustness enhancements](https://github.com/smarnach/pyexiftool/pull/11) by [Matthias Kiefer (kiefermat)](https://github.com/kiefermat) on Oct 27, 2014<br>*On linux call prctl in subprocess to be sure that the exiftool child process is killed even if the parent process is killed by itself*<br>also removed print_conversion<br>also merged the common_args and added_args into one args list
2323
07/19/2019 01:18:26 AM (PDT) | 0.3.4 | Merge the rest of Pull request #11. Added the other pieces, however, I added them as "wrappers" instead of modifying the interface of the original code. I feel like the additions here are overly done, and as I understand the code more, I'll either remove it or incorporate it into single functions<br>from #11 *When getting json results, verify that the results returned by exiftool actually belong to the correct file by checking the SourceFile property of the returned result*<br>and also *Added possibility to provide different exiftools params for each file separately*
2424
07/19/2019 01:22:48 AM (PDT) | 0.3.5 | changed a bit of the test_exiftool so all the tests pass again
25-
25+
01/04/2020 11:59:14 AM (PST) | 0.3.6 | made the tests work with the latest output of ExifTool. This is the final version which is named "exiftool"
26+
01/04/2020 12:16:51 PM (PST) | 0.4.0 | pyexiftool rename (and make all tests work again) ... I also think that the pyexiftool.py has gotten too big. I'll probably break it out into a directory structure later to make it more maintainable
2627

2728

2829
# Changes around the web
File renamed without changes.
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from __future__ import unicode_literals
44

55
import unittest
6-
import exiftool
6+
import pyexiftool
77
import warnings
88
import os
99
import shutil
@@ -13,7 +13,7 @@ class TestExifTool(unittest.TestCase):
1313

1414
#---------------------------------------------------------------------------------------------------------
1515
def setUp(self):
16-
self.et = exiftool.ExifTool(common_args=["-G", "-n", "-overwrite_original"])
16+
self.et = pyexiftool.ExifTool(common_args=["-G", "-n", "-overwrite_original"])
1717
def tearDown(self):
1818
if hasattr(self, "et"):
1919
self.et.terminate()
@@ -56,7 +56,7 @@ def test_termination_implicit(self):
5656
def test_invalid_args_list(self):
5757
# test to make sure passing in an invalid args list will cause it to error out
5858
with self.assertRaises(TypeError):
59-
exiftool.ExifTool(common_args="not a list")
59+
pyexiftool.ExifTool(common_args="not a list")
6060
#---------------------------------------------------------------------------------------------------------
6161
def test_get_metadata(self):
6262
expected_data = [{"SourceFile": "rose.jpg",
@@ -133,12 +133,12 @@ def test_set_keywords(self):
133133
shutil.copyfile(f, f_mod)
134134
source_files.append(f_mod)
135135
with self.et:
136-
self.et.set_keywords(exiftool.KW_REPLACE, d["Keywords"], f_mod)
136+
self.et.set_keywords(pyexiftool.KW_REPLACE, d["Keywords"], f_mod)
137137
kwtag0 = self.et.get_tag("IPTC:Keywords", f_mod)
138138
kwrest = d["Keywords"][1:]
139-
self.et.set_keywords(exiftool.KW_REMOVE, kwrest, f_mod)
139+
self.et.set_keywords(pyexiftool.KW_REMOVE, kwrest, f_mod)
140140
kwtag1 = self.et.get_tag("IPTC:Keywords", f_mod)
141-
self.et.set_keywords(exiftool.KW_ADD, kw_to_add, f_mod)
141+
self.et.set_keywords(pyexiftool.KW_ADD, kw_to_add, f_mod)
142142
kwtag2 = self.et.get_tag("IPTC:Keywords", f_mod)
143143
os.remove(f_mod)
144144
self.assertEqual(kwtag0, d["Keywords"])
@@ -156,15 +156,15 @@ def test_executable_found(self):
156156
else:
157157
test_path = "/"
158158

159-
test_exec = exiftool.DEFAULT_EXECUTABLE
159+
test_exec = pyexiftool.DEFAULT_EXECUTABLE
160160

161161
# should be found in path as is
162-
self.assertTrue(exiftool.find_executable(test_exec, path=None))
162+
self.assertTrue(pyexiftool.find_executable(test_exec, path=None))
163163

164164
# modify path and search again
165-
self.assertFalse(exiftool.find_executable(test_exec, path=test_path))
165+
self.assertFalse(pyexiftool.find_executable(test_exec, path=test_path))
166166
os.environ['PATH'] = test_path
167-
self.assertFalse(exiftool.find_executable(test_exec, path=None))
167+
self.assertFalse(pyexiftool.find_executable(test_exec, path=None))
168168

169169
# restore it
170170
os.environ['PATH'] = save_sys_path

0 commit comments

Comments
 (0)