Streamlit Apptest Number input

I am trying to test a number input using the AppTest module. I have 2 files the app.py and the testing file.

app.py

ntest_val = st.number_input(
    "Enter a value - ",
    min_value=0,
    max_value=8,
    value=0,
    key = 'ntest_val',
    step=1,
)

and in my testing py file I have this function

def test_input():
    at = AppTest.from_file(app.py).run()
    at.number_input("ntest_val").set_value(15).run()
    test_value = at.number_input("ntest_val").value
   # print(test_value) --> displays 15
    assert not at.exception

The test_value displays 15 but it violates the min & max value established in the number input element in app. Shouldn’t this create an exception? Is it because the test assumes we don’t override the UI’s constraint enforcement mechanisms? Curious to know how I can test this better?

Thanks