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

Tickets/DM-11691 Test failure with butler in obs_sdss #36

Merged
merged 1 commit into from Aug 30, 2017

Conversation

n8pease
Copy link
Contributor

@n8pease n8pease commented Aug 29, 2017

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.

I think I prefer an mkdtemp to be involved or some way to clean up the YAML file that gets written. Is it posible for the _mapper file to have some commentary in it so that people understand what is going on? Or at least add some more text to the associated commit message.



class GetIdTestCase(lsst.utils.tests.TestCase):
"""Testing butler exposure id retrieval"""

def setUp(self):
self.bf = dafPersist.ButlerFactory(mapper=SdssMapper(root="."))
self.butler = self.bf.create()
self.butler = dafPersist.Butler(inputs=os.path.split(ROOT)[0])
Copy link
Member

Choose a reason for hiding this comment

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

Should this be a temp directory rather than an existing directory, given that a yaml file is created that seems to in theory have an effect the next time the test is run?

@timj
Copy link
Member

timj commented Aug 29, 2017

In fact, the test passes if the YAML file is not there, so using a temp directory would make that always true. Is the {} vs None problem not a real problem?

@n8pease
Copy link
Contributor Author

n8pease commented Aug 29, 2017

previously where the butler was created with ROOT='.' I assumed it was actually using the top level dir as an input repo, which is why I set it up to use it as an Old Butler repository. I see that's not the case, it's not actually reading any data from the repository. So I'll have it make a read-write repo in a temp location.

@n8pease
Copy link
Contributor Author

n8pease commented Aug 29, 2017

it seems {} vs None is unrelated.

@n8pease n8pease merged commit 1963185 into master Aug 30, 2017
@ktlim ktlim deleted the tickets/DM-11691 branch August 25, 2018 05:50
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