-
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 831 to 937 to the new testsuite #353
Conversation
e65f1e6
to
23c73b9
Compare
@clanmills Could you take a look at the test for issue 836? It is failing on Travis on OSX (the only platform that has resource forks), but I am unsure if it is a regression or my mistake. Also, please note that resource forks are now accessible via |
03052ca
to
4b65458
Compare
Nevermind, I forgot to copy the resource fork correctly. It seems to work now. |
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.
I just made few suggestions, feel free to take actions about them or not. Good job!
from system_tests import CaseMeta, path | ||
|
||
|
||
class CrashOnInput(metaclass=CaseMeta): |
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.
[suggestion] Should we rename the test from crash...
to throw...
? The application was crashing before the fix, but now it is throwing an exception.
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.
Uh, yeah, now that I re-read the class name, it sounds like it should crash...
from system_tests import CaseMeta, path | ||
|
||
|
||
class SegfaultWhenAccessingFocalLength(metaclass=CaseMeta): |
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.
[suggestion] Same comment here. I guess the application was crashing before, but now we are controlling the situation.
"""Exif.Pentax.LensType Byte 2 PENTAX-F 28-80mm F3.5-4.5 | ||
""" | ||
] | ||
stderr = [""] * 3 |
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.
[suggestion] What about removing the hard-coded value (3
) and use [""] * len(commands)
?
The FileDecoratorBase injects a new setUp & tearDown function. These new functions would call the old setUp & tearDown in an inconvenient order: e.g. the child class CopyFiles would at first call the user provided setUp and then copy the files. This makes it impossible to perform some action on the file copy in setUp. => This commit changes the call order, so that setUp & tearDown always "see" the finished environment after file copies are in place and before any cleanup took place.
fabf3de
to
35e7037
Compare
setUp
&tearDown
functions in a more logical order (setUp
is called after the copy is made andtearDown
before the file is deleted).937a
. The original test would run the following:However, the first command produces no output at all, thus the diff
$num.txt
is just$num-after.txt
prepended with>
. To be honest, I then don't really get the point of comparing that diff to another diff (if I understood the redmine discussion correctly, the original diff is the output before the respective patch got applied). For simply testing the behavior of exiv2, it should be sufficient to just check the output of the second invocation ofexiv2 -pa $filename
.