diff options
author | tgingold <tgingold@users.noreply.github.com> | 2022-12-02 07:31:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-02 07:31:12 +0100 |
commit | 01660fb74049c5258f0e2868e0a0c5e89446de8d (patch) | |
tree | b2c60ad75d6471b9eaff6cc8c9cc6696a2c234f6 /testsuite/pyunit/libghdl/Comments.py | |
parent | d99076123a58f4d2a7e93706c5adecbd5b99ff8f (diff) | |
parent | 3a1784a57516346e299e57c865399d6538df9e14 (diff) | |
download | ghdl-01660fb74049c5258f0e2868e0a0c5e89446de8d.tar.gz ghdl-01660fb74049c5258f0e2868e0a0c5e89446de8d.tar.bz2 ghdl-01660fb74049c5258f0e2868e0a0c5e89446de8d.zip |
Merge pull request #2255 from Paebbels/paebbels/f-strings
f-strings
Diffstat (limited to 'testsuite/pyunit/libghdl/Comments.py')
-rw-r--r-- | testsuite/pyunit/libghdl/Comments.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/testsuite/pyunit/libghdl/Comments.py b/testsuite/pyunit/libghdl/Comments.py index 850d6137a..41bdacc66 100644 --- a/testsuite/pyunit/libghdl/Comments.py +++ b/testsuite/pyunit/libghdl/Comments.py @@ -33,7 +33,7 @@ class Instantiate(TestCase): # Finish initialization. This will load the standard package. if libghdl.analyze_init_status() != 0: - self.fail("libghdl initialization error") + cls.fail("libghdl initialization error") def checkComments(self, node, name) -> None: f = files_map.Location_To_File(nodes.Get_Location(node)) @@ -41,7 +41,7 @@ class Instantiate(TestCase): while idx != file_comments.No_Comment_Index: s = file_comments.Get_Comment(f, idx) self.assertTrue(s.find(':'+name+':') >= 0, - "no :{}: in '{}'".format(name, s)) + f"no :{name}: in '{s}'") idx = file_comments.Get_Next_Comment(f, idx) def checkFlist(self, flist) -> None: @@ -83,7 +83,7 @@ class Instantiate(TestCase): file_id = name_table.Get_Identifier(str(filename)) sfe = files_map.Read_Source_File(name_table.Null_Identifier, file_id) if sfe == files_map.No_Source_File_Entry: - self.fail("Cannot read file '{!s}'".format(filename)) + self.fail(f"Cannot read file '{filename!s}'") # Parse file = sem_lib.Load_File(sfe) |