def test_port():
    'Test TCP/UDP network port.'
    schema = vol.Schema(cv.port)
    for value in ('invalid', None, (- 1), 0, 80000, '81000'):
        with pytest.raises(vol.MultipleInvalid):
            schema(value)
    for value in ('1000', 21, 24574):
        schema(value)
Test TCP/UDP network port.
def test_port():
    
    schema = vol.Schema(cv.port)
    for value in ('invalid', None, (- 1), 0, 80000, '81000'):
        with pytest.raises(vol.MultipleInvalid):
            schema(value)
    for value in ('1000', 21, 24574):
        schema(value)