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
tickets/DM-7248 #44
tickets/DM-7248 #44
Conversation
Several tests in meas_algorithms were named improperly i.e. did not begin with test etc.. This commit renames all of those tests to the standard naming convention i.e. prepends a 'test' in front of the name and capitalizes the former first character.
c9ea3d5
to
574455a
Compare
0b9289a
to
c269e01
Compare
class UtilsBinaryTester(lsst.utils.tests.ExecutablesTestCase): | ||
pass | ||
|
||
EXECUTABLES = ['testPsfAttributes', 'testSizeMagnitudeStarSelector', 'testImagePsf', 'testPsfCaching', 'testWarpedPsf'] |
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.
Is this necessary? I thought it found all binaries by default.
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 didn't know it did that! It is great if it does that. I can check and revert to the default if that's true...
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.
It will auto detect. If you give a list then it will report if the test executable can't be found (maybe it wasn't built). If you don't give a list it will only test what it can find.
meas_algorithms has several executable tests that were formerly being run by the SCons build system. This commit makes these tests runnable via py.test by adding them to the testExecutables script.
Most tests in meas_algorithms needed updating (performed in this commit) to make them runable under the py.test framework. At the same time, the test code has been cleaned up with the usage of assert_, assertEquals removed and instances of assertTrue/False replaced with more specific equivalents when possible. Finally, the actual formatting of the code has been revised to meet the LSST PEP8 standard using autopep8.
c269e01
to
f9d6802
Compare
…and modernize to python 2
f9d6802
to
ea4d154
Compare
@@ -24,8 +24,8 @@ python/lsst/meas/algorithms/version.py | |||
tests/.tests | |||
tests/data/psf*.* | |||
tests/photometry | |||
tests/psfAttributes |
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.
Looks like tests/photometry can be removed.
Stop setting a few unused variables. Remove a line that computed an unused string. Remove a bit of commented-out code.
@@ -30,21 +32,20 @@ | |||
|
|||
import numpy as np | |||
|
|||
import lsst.utils | |||
import lsst.afw.table as afwTable | |||
import lsst.afw.geom as afwGeom | |||
import lsst.afw.coord as afwCoord | |||
import lsst.daf.persistence as dafPersist | |||
from lsst.meas.algorithms import IngestIndexedReferenceTask, LoadIndexedReferenceObjectsTask, \ | |||
LoadIndexedReferenceObjectsConfig, getRefFluxField |
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.
Clean up the unittest code and remove some extra whitespace. Get path to data via __file__. Remove extra file in .gitignor. Move random seed initializer into setup.
eb5e9c1
to
b735ab1
Compare
No description provided.