@@ -122,19 +122,6 @@ def _makeConfigFromDict(dict_):
122
122
123
123
it .assertSameFile = assertSameFile (it )
124
124
125
- def _assertMsgQueueIsEmpty (project ):
126
- msg = []
127
- while not project ._msg_queue .empty ():
128
- msg += [str (project ._msg_queue .get ())]
129
-
130
- if msg :
131
- msg .insert (
132
- 0 , "Message queue should be empty but has %d messages" % len (msg )
133
- )
134
- it .fail ("\n " .join (msg ))
135
-
136
- it .assertMsgQueueIsEmpty = _assertMsgQueueIsEmpty
137
-
138
125
@it .should ("warn when setup is taking too long" )
139
126
@patch ("hdl_checker.base_server._HOW_LONG_IS_TOO_LONG" , 0.1 )
140
127
@patch .object (
@@ -578,8 +565,6 @@ def test():
578
565
diagnostics ,
579
566
)
580
567
581
- it .assertMsgQueueIsEmpty (it .project )
582
-
583
568
it .assertTrue (it .project .database .paths )
584
569
585
570
@it .should ("get messages for relative path" ) # type: ignore
@@ -591,8 +576,6 @@ def test():
591
576
592
577
it .assertFalse (p .isabs (filename ))
593
578
594
- it .assertMsgQueueIsEmpty (it .project )
595
-
596
579
diagnostics = it .project .getMessagesByPath (Path (filename ))
597
580
598
581
it .assertIn (
@@ -606,8 +589,6 @@ def test():
606
589
diagnostics ,
607
590
)
608
591
609
- it .assertMsgQueueIsEmpty (it .project )
610
-
611
592
@it .should ("get messages with text" ) # type: ignore
612
593
def test ():
613
594
it .assertTrue (it .project .database .paths )
@@ -625,8 +606,6 @@ def test():
625
606
for lnum , line in enumerate (content .split ("\n " )):
626
607
_logger .debug ("%2d| %s" , (lnum + 1 ), line )
627
608
628
- it .assertMsgQueueIsEmpty (it .project )
629
-
630
609
diagnostics = set (it .project .getMessagesWithText (filename , content ))
631
610
632
611
logIterable ("Diagnostics" , diagnostics , _logger .info )
@@ -651,7 +630,6 @@ def test():
651
630
]
652
631
653
632
it .assertCountEqual (diagnostics , expected )
654
- it .assertMsgQueueIsEmpty (it .project )
655
633
656
634
@it .should ( # type: ignore
657
635
"get messages with text for file outside the project file"
@@ -664,8 +642,6 @@ def test():
664
642
["library work;" , "use work.all;" , "entity some_entity is end;" ]
665
643
)
666
644
667
- it .assertMsgQueueIsEmpty (it .project )
668
-
669
645
diagnostics = it .project .getMessagesWithText (filename , content )
670
646
671
647
_logger .debug ("Records received:" )
@@ -688,14 +664,10 @@ def test():
688
664
689
665
raise
690
666
691
- it .assertMsgQueueIsEmpty (it .project )
692
-
693
667
@it .should ("get updated messages" ) # type: ignore
694
668
def test ():
695
669
filename = Path (p .join (TEST_PROJECT , "another_library" , "foo.vhd" ))
696
670
697
- it .assertMsgQueueIsEmpty (it .project )
698
-
699
671
code = open (str (filename ), "r" ).read ().split ("\n " )
700
672
701
673
code [28 ] = "-- " + code [28 ]
@@ -719,14 +691,10 @@ def test():
719
691
code [28 ] = code [28 ][3 :]
720
692
writeListToFile (str (filename ), code )
721
693
722
- it .assertMsgQueueIsEmpty (it .project )
723
-
724
694
@it .should ("get messages by path of a different source" ) # type: ignore
725
695
def test ():
726
696
filename = Path (p .join (TEST_PROJECT , "basic_library" , "clock_divider.vhd" ))
727
697
728
- it .assertMsgQueueIsEmpty (it .project )
729
-
730
698
it .assertCountEqual (
731
699
it .project .getMessagesByPath (filename ),
732
700
[
@@ -740,17 +708,13 @@ def test():
740
708
],
741
709
)
742
710
743
- it .assertMsgQueueIsEmpty (it .project )
744
-
745
711
@it .should ( # type: ignore
746
712
"get messages from a source outside the project file"
747
713
)
748
714
def test ():
749
715
filename = Path (p .join (TEST_TEMP_PATH , "some_file.vhd" ))
750
716
writeListToFile (str (filename ), ["library some_lib;" ])
751
717
752
- it .assertMsgQueueIsEmpty (it .project )
753
-
754
718
diagnostics = it .project .getMessagesByPath (filename )
755
719
756
720
_logger .info ("Records found:" )
@@ -766,8 +730,6 @@ def test():
766
730
"message here indicating an error" ,
767
731
)
768
732
769
- it .assertMsgQueueIsEmpty (it .project )
770
-
771
733
def basicRebuildTest (test_filename , rebuilds ):
772
734
calls = []
773
735
ret_list = list (reversed (rebuilds ))
0 commit comments