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-7244: Port to Python 3 #15
Conversation
getInputRegistry had one trivial change
Remove assertTrue with more specific asserts where practical. No instances of assertEquals or assert_ found
Use full path for lsst.utils.tests and in some other cases to avoid confusion (e.g. when importing Policy from two packages).
Two tests imported TestMapper into the local namespace, which pytest complained about as not being a test class.
loc = "raw-v%(visit)d-E%(snap)03d-r%(raft)s-s%(sensor)s-c%(channel)s.pickle" % dataId | ||
loc = os.path.join("tests", "data", "input", loc) | ||
num = int(raft[0] + raft[2] + sensor[0] + sensor[2] + | ||
channel[0] + channel[2]) * 10 + snap | ||
channel[0] + channel[2]) * 10 + snap | ||
if raft != "0,3" or (snap != 1 and sensor != "0,1"): | ||
with open(loc, "w") as f: |
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 worry that this pickle file should be opened in "wb" mode. I'm guessing the test never tries to read from the dumped pickle file. Do we have any check to see if we can read this dumped file back again?
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.
Good catch. This is an obsolete file. I deleted it.
|
Good catch |
Instead of using a relative path to get to repo data in testPolicyInRepo.py, use the standard getPackageDir technique
No description provided.