def METHOD_NAME(self):
    """
    This overrides the HOME environment variable, so that paths beginning
    with '~/' expand to the data directory. Used by the `home_is_data`
    fixture.
    """
    self.home_is_data = True
    # For Unix
    self.monkeypatch.setenv("HOME", self.data_dir)
    # For Windows
    self.monkeypatch.setenv("USERPROFILE", self.data_dir)