Skip to content
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

DM-9297 make jointcal work with pytest #36

Merged
merged 2 commits into from May 2, 2017
Merged

DM-9297 make jointcal work with pytest #36

merged 2 commits into from May 2, 2017

Conversation

parejkoj
Copy link
Collaborator

No description provided.

Copy link
Member

@timj timj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok, but please test with testdata_jointcal being unavailable as I don't think it will skip properly.

cls.data_dir = lsst.utils.getPackageDir('testdata_jointcal')
os.environ['ASTROMETRY_NET_DATA_DIR'] = os.path.join(cls.data_dir, 'cfht_and_index')
except lsst.pex.exceptions.NotFoundError:
cls.data_dir = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing seems to be making the tests skip if this data dir is not set. The other tests raise the skip error.

cls.data_dir = lsst.utils.getPackageDir('testdata_jointcal')
os.environ['ASTROMETRY_NET_DATA_DIR'] = os.path.join(cls.data_dir, 'hsc_and_index')
except lsst.pex.exceptions.NotFoundError:
cls.data_dir = None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Riase SkipTest here.

cls.data_dir = lsst.utils.getPackageDir('testdata_jointcal')
os.environ['ASTROMETRY_NET_DATA_DIR'] = os.path.join(cls.data_dir, 'twinkles1_and_index')
except lsst.pex.exceptions.NotFoundError:
unittest.SkipTest("testdata_jointcal not setup")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

raise? Have you tested this package with testdata_jointcal not setup?

@parejkoj
Copy link
Collaborator Author

parejkoj commented May 1, 2017

Thanks for catching those missing raises: I hadn't actually tested it with testdata_jointcal setup (I have now).

Move dist_rms_absolute into setUp, so it behaves correctly with pytest
@parejkoj parejkoj merged commit 369aa14 into master May 2, 2017
@ktlim ktlim deleted the tickets/DM-9297 branch August 25, 2018 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants