Open RhetTbull opened 2 years ago
I am able to replicate this on a machine with Big Sur. The CLI tests manipulating kMDItemAuthors fail every time BUT when I open a python REPL and shell and replicate the tests manually, line by line, everything works as expected. I believe this and the finder comment failures have something to do with the pytest environment but I can't figure out the issue.
>>> from osxmetadata import *
>>> md = OSXMetaData("test_file.txt")
>>> md.tags = [Tag("test",0)]
>>> md.tags
[Tag(name='test', color=0)]
>>> md.authors = ["John Doe", "Jane Doe"]
>>> md.wherefroms =["http://www.apple.com"]
>>> import datetime
>>> md.downloadeddate = [datetime.datetime(2019,1,1)]
>>> md.findercomment = "Hello World"
python -m osxmetadata test_file.txt --get comment --set authors "John
Smith" --restore --set title "Test Title" --clear title --append tags test2 --set comment foo --remove authors "Jane Do
e" --append authors "Jane Smith" --mirror comment findercomment
comment kMDItemComment = Hello World
Python 3.10.4 (main, Apr 26 2022, 19:43:24) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from osxmetadata import *
>>> from osxmetadata import *
>>> md = OSXMetaData("test_file.txt")
>>> md.authors
['John Smith', 'Jane Smith']
Originally posted by @RhetTbull in https://github.com/RhetTbull/osxmetadata/issues/61#issuecomment-1272576053