Skip to content

Conversation

agroener
Copy link
Contributor

Picking up where I left off regarding the creation of tests for the CosmoSim module. This PR is ideally going to replace a previous one (#458) once it is completely up and running, ideally. This is also related to a current issue (#599).

@@ -379,8 +387,8 @@ def check_all_jobs(self, phase=None, regex=None, sortby=None):
if not phase and not regex:
if not sortby:
t = Table()
t['JobID'] = self.job_dict.keys()
t['Phase'] = self.job_dict.values()
t['JobID'] = [i for i in self.job_dict.keys()]
Copy link
Contributor

Choose a reason for hiding this comment

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

could use list(self.job_dict.keys()) for the same effect

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes - I definitely tried casting to a list straight away. However, oddly enough, it gave me issues. I had to actually do a list comprehension to fix this. Nonetheless, I'm going to see if it works.

@keflavich
Copy link
Contributor

@agroener your testing issues are arising because you import ipdb. It seems that ipdb and pytest are incompatible

@agroener
Copy link
Contributor Author

Ok. I've written some tests for the login/logout procedure for cosmosim. I've pushed up my changes because at this point in time, keyring is now doing something unexpected (since the last time I used it). It now is asking me for:

Please enter password for encrypted keyring:

To remind ourselves, cosmosim uses the login method from its base class QueryWithLogin. Either keyring has changed in some way, or the implementation of this method has. Any thoughts?

@keflavich
Copy link
Contributor

keyring requires you to enter your global password to get access to any hidden passwords. On Mac OS, this is done with the OS Keychain app, and on linux it's done with something called 'secret service': https://pypi.python.org/pypi/keyring. So I think that message is most likely coming from secret service and you're on a linux box? Otherwise I don't know what it means exactly

@agroener
Copy link
Contributor Author

Okay, that makes a bit more sense now. I did most of my developing on OS X previously. Now, I'm on linux, which is why the expected keyring behavior is differing. I'll go back to OS X for now, but I need to normalize the behavior after I get all of this working. I don't want this module to be platform dependent in any way.

@keflavich
Copy link
Contributor

@agroener where do we stand with this and #458?

@agroener
Copy link
Contributor Author

Well, I had intended to complete both a few weeks ago, but once I began working, I realized there were some minor discrepancies with keyring between OS X and Linux which was causing some unexpected login behavior. I've since fixed the issue, and things seem to be normalized a bit. The tests which I spent time on this last round of coding were regarding login/logout, of which there are a number of possible combinations when storing/deleting credentials are considered.

I'll see if I can get around to finishing off login/logout and query tests in the next couple of weeks, pending my work schedule.

@bsipocz bsipocz force-pushed the master branch 2 times, most recently from ab0c591 to 712c326 Compare June 8, 2018 12:58
@keflavich
Copy link
Contributor

This has lingered for a little more than a week. I'm closing it. Please reopen if you complete it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants