Bug 91028 - MockFileSystem shouldn't create directories automatically in write_binary_file()
Summary: MockFileSystem shouldn't create directories automatically in write_binary_file()
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-11 15:29 PDT by Dirk Pranke
Modified: 2017-07-18 08:27 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Pranke 2012-07-11 15:29:32 PDT
the MockFileSystem's implementation of write_binary_file() will "create" the directory for the file automatically; this is bad because it is inconsistent with what the real filesystem does and can mask bugs (e.g., bug 90872).

this was originally done for convenience so that you could just say mock_fs.write_text_file('foo/bar/baz.html') when writing your test and not have to worry about creating fake directories. However, we should probably a different way of doing this that doesn't break the semantics for non-test code.