Skip to content

Unit Tests and AttachFromFile #394

Description

@kdsudac

New unit test util's are really useful.

Ran into a little bit of a pain point with test.AttachFromFile(filename) since need to mock out open:

mo = mock.mock_open()

with mock.patch('openhtf.exe.phase_data.open', mo, create=True):
    phase_record = yield MyPhase

assert FILENAME in phase_record.attachments

Would be nice if we could make this happen under the hood.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions