コード例 #1
0
ファイル: test_Signal.py プロジェクト: vaizguy/myhdl-python
 def testValAttrReadOnly(self):
     """ val attribute should not be writable"""
     s1 = Signal(1)
     try:
         s1.val = 1
     except AttributeError:
         pass
     else:
         self.fail()
コード例 #2
0
ファイル: test_Signal.py プロジェクト: Cadavis8/myhdl
 def testValAttrReadOnly(self):
     """ val attribute should not be writable"""
     s1 = Signal(1)
     try:
         s1.val = 1
     except AttributeError:
         pass
     else:
         self.fail()
コード例 #3
0
 def testValAttrReadOnly(self):
     """ val attribute should not be writable"""
     s1 = Signal(1)
     with pytest.raises(AttributeError):
         s1.val = 1
コード例 #4
0
ファイル: test_Signal.py プロジェクト: Aravind-Suresh/myhdl
 def testValAttrReadOnly(self):
     """ val attribute should not be writable"""
     s1 = Signal(1)
     with pytest.raises(AttributeError):
         s1.val = 1