'Test with binary data.'

def test_binary(self, tmpdir):

    filename = (tmpdir / 'foo')
    with qtutils.savefile_open(str(filename), binary=True) as f:
        f.write('\xde\xad\xbe\xef')
    assert (tmpdir.listdir() == [filename])
    assert (filename.read_binary() == '\xde\xad\xbe\xef')
