fix depr warning and tweak nlp formatting in test