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-7244: Port to Python 3 #15

Merged
merged 14 commits into from Aug 20, 2016
Merged

DM-7244: Port to Python 3 #15

merged 14 commits into from Aug 20, 2016

Conversation

timj
Copy link
Member

@timj timj commented Aug 19, 2016

No description provided.

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:
Copy link
Member Author

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?

Copy link
Contributor

@r-owen r-owen Aug 19, 2016

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.

@timj
Copy link
Member Author

timj commented Aug 19, 2016

testPolicyInRepo.py has a problem with paths. It assumes that the files are in a "data" sub-directory relative to the person running the test.

@r-owen
Copy link
Contributor

r-owen commented Aug 19, 2016

Good catch

Instead of using a relative path to get to repo data
in testPolicyInRepo.py, use the standard getPackageDir technique
@r-owen r-owen merged commit d36b942 into master Aug 20, 2016
@ktlim ktlim deleted the tickets/DM-7244 branch August 25, 2018 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants