-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to public Pyomo
Data
objects (#12)
* Address defer_check -> defer_import deprecation * Switch to non-underscore base class names * Update pyomo requirement with minimum version * Add test to verify that no deprecations are emitted * Temporarily revert to deprecated name to ensure test fails * Revert "Temporarily revert to deprecated name to ensure test fails" This reverts commit 4596356. * ExpressionData -> NamedExpressionData --------- Co-authored-by: Ludovico Bianchi <[email protected]>
- Loading branch information
1 parent
2bffbb0
commit 4bf6514
Showing
6 changed files
with
38 additions
and
8 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import subprocess | ||
import sys | ||
|
||
import pytest | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"statement", | ||
[ | ||
"import parameter_sweep", | ||
], | ||
ids=repr, | ||
) | ||
@pytest.mark.parametrize( | ||
"sentinel", | ||
[ | ||
"DEPRECATED", | ||
], | ||
ids=repr, | ||
) | ||
def test_no_deprecation_warnings_emitted(sentinel: str, statement: str): | ||
res = subprocess.run( | ||
[sys.executable, "-c", statement], | ||
text=True, | ||
stderr=subprocess.PIPE, | ||
stdout=subprocess.PIPE, | ||
) | ||
assert res.returncode == 0 | ||
assert not sentinel in res.stdout | ||
assert not sentinel in res.stderr |