Update sdtest.py

update conditions, fixed indent