-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use pytest.importorskip
on test utils
#116
use pytest.importorskip
on test utils
#116
Conversation
Codecov ReportAll modified lines are covered by tests ✅ 📢 Thoughts on this report? Let us know!. |
@@ -9,7 +9,7 @@ | |||
|
|||
def test_roman_datamodel(): | |||
roman_datamodels = pytest.importorskip("roman_datamodels.datamodels") | |||
import roman_datamodels.tests.util as rutil | |||
rutil = pytest.importorskip("roman_datamodels.tests.util") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I no longer see the roman_datamodels.tests.util
submodule in roman_datamodels. mk_level2_image
is available from roman_datamodels.maker_utils
.
rutil = pytest.importorskip("roman_datamodels.tests.util") | |
rutil = pytest.importorskip("roman_datamodels.maker_utils") |
What options are there for updating the stpipe CI to run this test? At the moment I'm failing to find a run that installs roman_datamodels and runs the stpipe tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a datamodels
install target which installs stdatamodels
and roman_datamodels
. One of the test cases can specify that additional target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why roman_datamodels
is not mentioned in test dependencies:
Lines 22 to 35 in 5369e85
[project.optional-dependencies] | |
docs = [ | |
'numpydoc', | |
'sphinx', | |
'sphinx-automodapi', | |
'sphinx-rtd-theme', | |
'stsci-rtd-theme', | |
'tomli; python_version <"3.11"', | |
] | |
test = [ | |
'pytest >=7.0.0', | |
'pytest-doctestplus >=0.10.0', | |
] | |
And not in install dependencies:
Lines 14 to 19 in 5369e85
dependencies = [ | |
'asdf>=2.13', | |
'crds>=7.4.1.3', | |
'astropy>=5.0.4', | |
'importlib_metadata>=4.11.4', | |
] |
superseded by #118 |
closes #114
use
pytest.importorskip
to import util to make test image, to keep abstract model tests from failing ifroman_datamodels
is not installedstpipe/src/stpipe/tests/test_abstract_datamodel.py
Lines 8 to 13 in 58def5a