adding an assert to tests/python/api_lgrngn.py