def _create_cds_file(contents): """ Create a CDSFile object with 'contents' """ with mock.patch("vunit.sim_if.cds_file.read_file", autospec=True) as read_file: read_file.return_value = contents return CDSFile.parse("file_name")
def test_quotes_define(self): cds = CDSFile() cds["foo"] = "bar xyz" self._check_written_as(cds, 'define foo "bar xyz"\n')