Esempio n. 1
0
 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")
Esempio n. 2
0
 def test_quotes_define(self):
     cds = CDSFile()
     cds["foo"] = "bar xyz"
     self._check_written_as(cds, 'define foo "bar xyz"\n')