-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement the configuration for AISTATS 2025 and capture errors in bu…
…ndles.* (#153) * Autoupdate the pre-commit hook * Implement the AISTATS 2025 style * Implememt a test to catch unexpected 'column' arguments * Apply the new column-arg-test to the remaining multicol templates * Implement the multicol test-case via tags to enable reusing them for tex-or-not tests * Apply the usetex-test to all other tex-or-not bundles
- Loading branch information
Showing
10 changed files
with
209 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
"""Test that the functions in tueplots.bundles raise good errors when misused.""" | ||
|
||
import pytest | ||
import pytest_cases | ||
|
||
from tueplots import bundles | ||
|
||
|
||
@pytest_cases.case(tags=["multicol", "tex_or_not"]) | ||
def case_bundle_cvpr2024(): | ||
return bundles.cvpr2024 | ||
|
||
|
||
@pytest_cases.case(tags=["multicol", "tex_or_not"]) | ||
def case_bundle_icml2022(): | ||
return bundles.icml2022 | ||
|
||
|
||
@pytest_cases.case(tags=["multicol", "tex_or_not"]) | ||
def case_bundle_icml2024(): | ||
return bundles.icml2024 | ||
|
||
|
||
@pytest_cases.case(tags=["multicol"]) | ||
def case_bundle_aistats2022(): | ||
return bundles.aistats2022 | ||
|
||
|
||
@pytest_cases.case(tags=["multicol"]) | ||
def case_bundle_aistats2023(): | ||
return bundles.aistats2023 | ||
|
||
|
||
@pytest_cases.case(tags=["multicol"]) | ||
def case_bundle_aistats2025(): | ||
return bundles.aistats2025 | ||
|
||
|
||
@pytest_cases.case(tags=["multicol"]) | ||
def case_bundle_aaai2024(): | ||
return bundles.aaai2024 | ||
|
||
|
||
@pytest_cases.case(tags=["multicol"]) | ||
def case_bundle_uai2024(): | ||
return bundles.uai2023 | ||
|
||
|
||
@pytest_cases.case(tags=["tex_or_not"]) | ||
def case_bundle_neurips2021(): | ||
return bundles.neurips2021 | ||
|
||
|
||
@pytest_cases.case(tags=["tex_or_not"]) | ||
def case_bundle_neurips2022(): | ||
return bundles.neurips2022 | ||
|
||
|
||
@pytest_cases.case(tags=["tex_or_not"]) | ||
def case_bundle_neurips2023(): | ||
return bundles.neurips2023 | ||
|
||
|
||
@pytest_cases.case(tags=["tex_or_not"]) | ||
def case_bundle_neurips2024(): | ||
return bundles.neurips2024 | ||
|
||
|
||
@pytest_cases.case(tags=["tex_or_not"]) | ||
def case_bundle_iclr2023(): | ||
return bundles.iclr2023 | ||
|
||
|
||
@pytest_cases.case(tags=["tex_or_not"]) | ||
def case_bundle_iclr2024(): | ||
return bundles.iclr2024 | ||
|
||
|
||
@pytest_cases.parametrize_with_cases("bundle_fun", cases=".", has_tag=["multicol"]) | ||
def test_column_neither_half_nor_full_raises_value_error(bundle_fun): | ||
# Sanity checks | ||
_ = bundle_fun(column="half") | ||
_ = bundle_fun(column="full") | ||
|
||
with pytest.raises(ValueError, match="expected"): | ||
_ = bundle_fun(column="anything-but-half") | ||
|
||
|
||
@pytest_cases.parametrize_with_cases("bundle_fun", cases=".", has_tag=["tex_or_not"]) | ||
def test_usetex_must_be_bool_otherwise_type_error(bundle_fun): | ||
# Sanity checks | ||
_ = bundle_fun(usetex=True) | ||
_ = bundle_fun(usetex=False) | ||
|
||
with pytest.raises(ValueError, match="expected"): | ||
_ = bundle_fun(usetex=2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters