ENH: add environment, e.g. "longtable", to Styler.to_latex by attack68 · Pull Request #41866 · pandas-dev/pandas (original) (raw)
OK, I can see some confusion has arisen here, since environment="tabular" should never be used by a user. It would result in an outer and inner {tabular} environment erroneously. I have used it here as a shortcut to not needing 2 variables. However, I have now amended this test to avoid the confusion.
But with respect to broader testing I think cases are covered through dependencies, for example:
test_minimal_latex_tabular: tests just the core {tabular} structure without additions.test_longtable_minimal: tests just the core {longtable} structure without additions.test_comprehensive: tests the core outer {table} and inner {tabular} structure.test_longtable_comprehensive: tests the core {longtable} structure with features.test_latex_environment: checks {table} is properly substituted for another value in the outer structure.
However, reflecting on your comments, I have removed test_latex_enviroment and have, instead, incorporated it now into test_comprehensive as parameters, which I think you will prefer, and also this increased the power of the test.