Add test for `print_attrs()`.