RESOLVED FIXED Bug 52756
nrwt: remove fs refs from printing, test_failures, test_expectations, text_diff
https://bugs.webkit.org/show_bug.cgi?id=52756
Summary nrwt: remove fs refs from printing, test_failures, test_expectations, text_diff
Dirk Pranke
Reported 2011-01-19 15:29:28 PST
nrwt: remove fs refs from printing, test_failures, test_expectations, text_diff
Attachments
Patch (10.01 KB, patch)
2011-01-19 15:31 PST, Dirk Pranke
eric: review+
Dirk Pranke
Comment 1 2011-01-19 15:31:45 PST
Eric Seidel (no email)
Comment 2 2011-01-20 03:10:04 PST
Comment on attachment 79502 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=79502&action=review > Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py:126 > - return os.path.splitext(filename)[0] + modifier > + # FIXME: technically this breaks if files don't use ".ext" to indicate > + # the extension, but passing in a Filesystem object here is a huge > + # hassle. > + return filename[filename.rfind('.')] + modifier I might have just left this using os.path.splitext with a FIXME about using filesystem instead. > Tools/Scripts/webkitpy/layout_tests/test_types/text_diff.py:-36 > -from __future__ import with_statement We're sure this isn't needed?
Eric Seidel (no email)
Comment 3 2011-01-20 03:10:28 PST
Comment on attachment 79502 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=79502&action=review >> Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py:126 >> + return filename[filename.rfind('.')] + modifier > > I might have just left this using os.path.splitext with a FIXME about using filesystem instead. Does this need testing?
Dirk Pranke
Comment 4 2011-01-20 15:05:39 PST
Dirk Pranke
Comment 5 2011-01-20 15:06:14 PST
In reply to comment #2) > (From update of attachment 79502 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=79502&action=review > > > Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py:126 > > - return os.path.splitext(filename)[0] + modifier > > + # FIXME: technically this breaks if files don't use ".ext" to indicate > > + # the extension, but passing in a Filesystem object here is a huge > > + # hassle. > > + return filename[filename.rfind('.')] + modifier > > I might have just left this using os.path.splitext with a FIXME about using filesystem instead. > I felt it was better to not have any reference to os.path at all. > > Tools/Scripts/webkitpy/layout_tests/test_types/text_diff.py:-36 > > -from __future__ import with_statement > > We're sure this isn't needed? Yes. There are no "with" statements in the file.
Dirk Pranke
Comment 6 2011-01-20 15:06:28 PST
(In reply to comment #3) > (From update of attachment 79502 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=79502&action=review > > >> Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py:126 > >> + return filename[filename.rfind('.')] + modifier > > > > I might have just left this using os.path.splitext with a FIXME about using filesystem instead. > > Does this need testing? It is covered by the existing tests.
Dirk Pranke
Comment 7 2011-01-20 16:58:43 PST
(In reply to comment #6) > (In reply to comment #3) > > (From update of attachment 79502 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=79502&action=review > > > > >> Tools/Scripts/webkitpy/layout_tests/layout_package/test_failures.py:126 > > >> + return filename[filename.rfind('.')] + modifier > > > > > > I might have just left this using os.path.splitext with a FIXME about using filesystem instead. > > > > Does this need testing? > > It is covered by the existing tests. Or so I thought :( . See bug 52854.
Note You need to log in before you can comment on or make changes to this bug.