예제 #1
0
 def test_check_type(self):
     with pytest.raises(TypeError):
         BasicElement(is_enabled='True')
예제 #2
0
def test_basic_element_parameter_is_enable_check():
    with pytest.raises(TypeError, match=r".*must be bool.*"):
        BasicElement(name='DefaultwtjName',
                     comments='Random Comment!',
                     is_enable='True')
예제 #3
0
 def test_positive(self):
     element = BasicElement(name='MyName')
     assert element.name == 'MyName'
예제 #4
0
 def test_check_type(self):
     with pytest.raises(TypeError, match=r".*must be str.*"):
         BasicElement(name=847378)
예제 #5
0
 def test_positive(self):
     element = BasicElement(is_enabled=True)
     assert element.is_enabled is True
예제 #6
0
 def test_check_type2(self):
     with pytest.raises(TypeError):
         BasicElement(is_enabled=847378)
예제 #7
0
def test_basic_element_parameter_is_enable_check():
    with pytest.raises(TypeError, match=r".*must be bool.*"):
        BasicElement(is_enable='True')