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

"manage" support for packages #13

Merged
merged 1 commit into from
Jul 31, 2018
Merged

"manage" support for packages #13

merged 1 commit into from
Jul 31, 2018

Conversation

jesteria
Copy link
Member

manage command support for management packages

including automatic and recursive loading of submodules

including automatic and recursive loading of submodules
@jesteria
Copy link
Member Author

@thcrock Whenever you get a chance to take a look, and if this looks reasonable to you, I can merge it 👌

DATA_DIR = os.path.join(TEST_DIR, 'data')


def pm():
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this used? I'm not sure if this was left in from some manual testing or pytest magic I'm not aware of.

Copy link
Member Author

Choose a reason for hiding this comment

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

There aren't any committed references to pm, I don't think, no; it's a simple tool to provide test debugging to what is currently just a plain unittest suite. (With other set-ups you can simply run tests with the flag --pdb; but, for the moment, you can't here, so I added this for debugging.)

@cmd('target')
def subcommand(args):
target = getattr(test_argcmdr, args.target)
target.declare_success()
Copy link
Contributor

Choose a reason for hiding this comment

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

It wasn't totally clear on first read what these test/data files were and how they fit in. Looking at the test_argcmdr file helped, but just adding a bit of context as to how these commands should be used would be helpful when reading.

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 can understand how the diff might've been unclear, but I'm not entirely sure what you mean beyond that. These are just test fixtures, under the path test/data/. Do you mean a comment to reinforce this in each of these files?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think of fixtures as being data, not code. Not that there's a problem with this, but code fixtures are more opinionated about the context in which they are run; of course, data fixtures being plopped in a directory without context is its own problem, and generally leads to them being deprecated without anybody knowing.

In this case, it appears that it needs to specifically be called by a subclass of TryExecuteTestCase as the target, but the import and getattr implies a more generic usability.

Copy link
Member Author

Choose a reason for hiding this comment

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

That makes sense.

@thcrock
Copy link
Contributor

thcrock commented Jul 31, 2018

Looks good!

@jesteria jesteria merged commit fc7cfb0 into master Jul 31, 2018
@jesteria jesteria deleted the jsl/manage-package branch July 31, 2018 17:54
@jesteria
Copy link
Member Author

Thanks!!

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.

2 participants