-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
including automatic and recursive loading of submodules
80dcaab
to
a98406a
Compare
@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(): |
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.
Is this used? I'm not sure if this was left in from some manual testing or pytest magic I'm not aware of.
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.
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() |
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.
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.
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 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?
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 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.
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.
That makes sense.
Looks good! |
Thanks!! |
manage
command support for management packagesincluding automatic and recursive loading of submodules