-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port redmine issues from 1024 to 1170 #367
Conversation
@D4N Did you have the chance to look at these changes? |
Yes, I started yesterday but didn't have the time to go through everything.
|
|
||
url = "http://dev.exiv2.org/issues/1153" | ||
|
||
filenames = ["$data_path/exiv2-bug1153Aa.exv", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you written the file names here for a reason? Since you can create both lists via:
filenames = [
"$data_path/exiv2-bug1153{E}{i}.exv".format(E=E, i=i)
for E, i in itertools.product(
['A', 'J'],
"a b c d e f g h i j k".split()
)
]
commands = [
"$exiv2 -pa -g Lens {!s}".format(fname) for fname in filenames
]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Laziness. I will follow your proposal ;)
Could you try to re-create 15727cf with a different diff algorithm or change the commit message? To be honest, I haven't got a clue what got changed. |
On my machine test 1054 fails with this diff:
I'll take a look at that later, maybe it's just a local issue. |
I have spent a while in gdb debugging the Anyway, long story short, in the bash testsuite there is a sneaky: |
Yes, I noticed this problem about the timezones, and at the end I decided to leave the code as in the original test. Maybe we can investigate this issue in the future (And create an issue to not forget about it). Otherwise the printStructure EPIC will be delayed. |
The |
The problem with that is, that the python test suite will only work on local machines where the timezone is set to UTC (mine isn't). I would suggest that we temporarily skip the test unless I have a rough idea how we could add this into the test suite, which would also fix the issue with piping exiv2 commands together. In a nutshell, the user could provide a # -*- coding: utf-8 -*-
import system_tests
class aTest(metaclass=system_tests.CaseMeta):
commands = [
system_tests.Command(
"$exiv2 $filename", stdin=Variable # or string,
stdou=other_variable_where_stdout_is_written_to,
env={"TZ": "UTC", "LANG": "C"}
)
]
# rest as expected That will require some additional testing & fiddling with the metaclass, but it should be possible. I can create a new issue for a discussion of this.
Ah, I see. I am afraid there is not much that can be done, such diffs tend to look ugly. You can retry it with the |
@piponazo Could you squash your commits together, disable the test for issue 1054 unless |
@D4N Is there an existing way to disable tests easily? I am not sure how to do this. |
unittest.skip should work in this case. I think something like this should do the trick: import os
import unittest
import system_tests
@unittest.skipUnless(os.getenv('TZ') == 'UTC', "Testcase only works with the timezone set to UTC")
class Exiv2jsonRecursiveJsonTreeWithXMP(metaclass=system_tests.CaseMeta):
# rest here |
* Port redmine issue 1024 * Port redmine issue 1026 * Port redmine issue 1040 * Port redmine issue 1044 * Port redmine issue 1053 * Port redmine issue 1054 (not finished yet; I found some issues there) * Port redmine issue 1058 * Port redmine issue 1062 * Port redmine issue 1080 * Port redmine issue 1108 * Port redmine issue 1112 * Port redmine issue 1114 * Port redmine issue 1122 * Port redmine issue 1140 * Port redmine issue 1144 * Port redmine issue 1145 * Port redmine issue 1153 * Port redmine issue 1155 * Port redmine issue 1166 * Port redmine issue 1167 * Port redmine issue 1170 * Replace escaped chars in 1054 * Add brackets in exiv2json::main() * Link all sample apps against exiv2lib * Changes in 1054 * test 1054: fix dates depending on Local time * Do not run make with VERBOSE=1 * Use system_tests.path * Fix windows issues with quotes * Use system_tests.path * Use itertools to simplify test code
This is needed in some tests which are using exiv2json. It seems that during metadata conversion, the dates are converted from the original timezone (which seems to be saved in xmp) into the local time zone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the grind work!
In this PR I'm porting most of the remaining redmine issues. However I skipped few of them:
exiv2
executions and our python test infrastructure is not prepared for that.I just want to contribute what I have done until now. In the next weeks I will be less available and I did not want to block the removal of the
printStructure
function.