(constructor)
| 108 | |
| 109 | |
| 110 | def test_bad_facet_spacing_error(constructor): |
| 111 | df = bad_facet_spacing_df(constructor_func=constructor) |
| 112 | with pytest.raises( |
| 113 | ValueError, match="Use the facet_row_spacing argument to adjust this spacing." |
| 114 | ): |
| 115 | px.scatter(df, x="x", y="y", facet_row="category", facet_row_spacing=0.01001) |
| 116 | with pytest.raises( |
| 117 | ValueError, match="Use the facet_col_spacing argument to adjust this spacing." |
| 118 | ): |
| 119 | px.scatter(df, x="x", y="y", facet_col="category", facet_col_spacing=0.01001) |
| 120 | # Check error is not raised when the spacing is OK |
| 121 | try: |
| 122 | px.scatter(df, x="x", y="y", facet_row="category", facet_row_spacing=0.01) |
| 123 | except ValueError: |
| 124 | # Error shouldn't be raised, so fail if it is |
| 125 | assert False |
| 126 | try: |
| 127 | px.scatter(df, x="x", y="y", facet_col="category", facet_col_spacing=0.01) |
| 128 | except ValueError: |
| 129 | # Error shouldn't be raised, so fail if it is |
| 130 | assert False |
nothing calls this directly
no test coverage detected