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

Support posargs to tox #1066

Merged
merged 2 commits into from
Apr 25, 2017
Merged

Support posargs to tox #1066

merged 2 commits into from
Apr 25, 2017

Conversation

kmosher
Copy link
Contributor

@kmosher kmosher commented Apr 18, 2017

Currently tox will always run all tests, which contradicts the README.

@@ -16,5 +17,10 @@ def run(command):
return check_call(command, shell=True)


_, args = OptionParser(usage="%prog TEST_DIR ...").parse_args()
Copy link
Contributor

Choose a reason for hiding this comment

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

To make this simpler, I would probably just pass sys.argv through to the underlying command instead of trying to parse arguments here, defaulting to just unit/ functional/ if sys.argv is empty.

@dstufft
Copy link
Contributor

dstufft commented Apr 25, 2017

Other than the change to using sys.argv, this looks good to me.

@kmosher
Copy link
Contributor Author

kmosher commented Apr 25, 2017

I don't know if OptionParser is really any more complicated than reading sys.argv, and you get some help text for free to boot, but I don't have strong opinions either way. The bigger simplification was ditching the shell=True kwarg, which means we don't have to worry about arg quoting.

@dstufft
Copy link
Contributor

dstufft commented Apr 25, 2017

The simplification was largely that it allows you to pass additional things besides paths to the script now as well.

@kmosher
Copy link
Contributor Author

kmosher commented Apr 25, 2017

Good point. For some reason I was thinking OptionParser() passed through unknown flags as posargs, but that's not the behavior now that I check. Thanks for the review.

@dstufft dstufft merged commit 18f2969 into boto:develop Apr 25, 2017
@dstufft
Copy link
Contributor

dstufft commented Apr 25, 2017

Thanks!

awstools added a commit that referenced this pull request Aug 1, 2017
* release-1.4.5: (23 commits)
  Bumping version to 1.4.5
  Add release note entry for LifecycleConfiguration
  Add LifecycleConfiguration resource
  Backward compatible bug fix for typo in MultipartUploads (#1142)
  Fix example in doc (#1158)
  Assert that unsigned resources stay unsigned
  s/paramter/parameter/
  Update docs for multiprocessing
  Rename [wheel] section to [bdist_wheel] as the former is legacy (#1112)
  added s3 download_file doc example (#1098)
  Allow Bucket.load() to work on cross-account buckets (#1064)
  Support posargs to tox (#1066)
  5x5 (#1050)
  Fix minor typo brought up in #1026 (#1027)
  Do not log call parameters on info level
  Update doc tests
  Update transfer.py (#1016)
  Fix typo in return type annotation
  Add new change types. (#992)
  Changed an info log to a debug log
  ...
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