Skip to content

Fix the use of -mtowncrier. #163#170

Merged
glyph merged 4 commits intotwisted:masterfrom
nedbat:nedbat/fix-dash-m-invocation
May 5, 2020
Merged

Fix the use of -mtowncrier. #163#170
glyph merged 4 commits intotwisted:masterfrom
nedbat:nedbat/fix-dash-m-invocation

Conversation

@nedbat
Copy link
Copy Markdown
Contributor

@nedbat nedbat commented Dec 2, 2019

This makes the -m invocation work.

I added a test, but:

  • I didn't know in what file you wanted it
  • I didn't know if Trial had a way to manage the current directory

Let me know if I should change anything.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Dec 2, 2019

Codecov Report

Merging #170 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #170   +/-   ##
=======================================
  Coverage   89.49%   89.49%           
=======================================
  Files          11       11           
  Lines         438      438           
  Branches       87       87           
=======================================
  Hits          392      392           
  Misses         25       25           
  Partials       21       21           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 706a48d...c91b053. Read the comment docs.

@charris
Copy link
Copy Markdown

charris commented Dec 3, 2019

Also need this.

@nedbat
Copy link
Copy Markdown
Contributor Author

nedbat commented Dec 3, 2019

@charris I don't know what you are referring to. Is there a larger conversation somewhere? Or did you mean to link to something that should be included in this PR?

@charris
Copy link
Copy Markdown

charris commented Dec 3, 2019

I run several versions of Python for testing and development, plus upgrading the OS twice a year. In that circumstance it is helpful to have towncrier work as a module so as to keep track of which Python it is installed with.

with open("pyproject.toml", "w") as f:
f.write('[tool.towncrier]\n' 'directory = "news"\n')
os.makedirs("news")
out = check_output(["python", "-m", "towncrier", "--help"])
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Probably should use sys.executable instead of 'python' here, to avoid relying on PATH

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

...hmm I didn't know this would show up as a "review", my intention was just to comment.

Copy link
Copy Markdown
Member

@glyph glyph left a comment

Choose a reason for hiding this comment

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

Thanks ned! A nice improvement to test coverage.

@glyph glyph merged commit 5c43102 into twisted:master May 5, 2020
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.

5 participants