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

#405 : Failing test showing that line endings are converted to CRLF #406

Closed
wants to merge 1 commit into from

Conversation

pombredanne
Copy link
Contributor

This test will fail on Windows for now until #405 is fixed

@pombredanne
Copy link
Contributor Author

and this fails alright as it should

@pombreda
Copy link

@audreyr do not apply this for now. It needs to be refined first.
The line endings cannot be converted blindly to LF.... some windows files must have CRLF endings such as cmd/bat scripts.... therefore the approach should be instead to preserve the line endings of a file instead. A tad more tricky

@hackebrot
Copy link
Member

Not too sure how to proceed on #405 and #406 tbh 😟

@hackebrot hackebrot added the windows This issue/PR related to windows systems only label Jul 30, 2015
@pydanny
Copy link
Member

pydanny commented May 6, 2016

🔔 What's the status on this PR?

@pombredanne
Copy link
Contributor Author

@pydanny no idea :) let me rebase this first!

@pombredanne
Copy link
Contributor Author

This is rebased and should pass the tests.... Yet the issue is still there: CRLF should not be translated to LF. That said, I have lost a lot (or most) of my patience for these kind of Windows minutiae.

@codecov-io
Copy link

codecov-io commented May 6, 2016

Current coverage is 99.66%

Merging #406 into master will increase coverage by -0.32%

  1. File ...ookiecutter/utils.py (not in diff) was modified. more
    • Misses +2
    • Partials 0
    • Hits -2
@@           master       #406   diff @@
========================================
  Files          13         13          
  Lines         583        583          
  Methods         0          0          
  Messages        0          0          
  Branches        0          0          
========================================
- Hits          583        581     -2   
- Misses          0          2     +2   
  Partials        0          0          

Powered by Codecov. Last updated by 0f57f88...81b875a

@lorengordon
Copy link

This is driving me nuts as well. I've converted all files in the cookiecutter template to LF, created a .gitattributes file forcing line endings to LF (both in the template repo and in the project repo), and still the project keeps getting created with CRLF line endings! Any bright ideas?

@theodesp
Copy link

theodesp commented Aug 9, 2017

@pombredanne There are some conflicts that need to be fixed for that if is to be merged 👍

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
@pombredanne
Copy link
Contributor Author

pombredanne commented Aug 10, 2017

@theodesp I rebased... but the vcs test patterns have evolved quite bit since last year so it may not pass... feel free to update as needed to make this mergeable.

NOTE: I did not check if the patch is still working either. Busy on other stuffs atm. I just rebased

@pombredanne
Copy link
Contributor Author

pombredanne commented Aug 10, 2017

@theodesp tests are failing ... make it pass if you want this in! It is not like I thoroughly enjoy keeping patches alive for 2.5 years ..... ;) so it is yours now or anyone else ;)

@pombredanne
Copy link
Contributor Author

@theodesp basically the code context has changed too much... This would need to be redone from the start

@pombredanne
Copy link
Contributor Author

@pydanny @audreyr IMHO this PR should be closed at it is and someone can restart something using it as a base if needed.

@ssbarnea ssbarnea closed this Jan 18, 2020
@insspb insspb self-assigned this May 27, 2020
@insspb insspb reopened this May 27, 2020
@insspb
Copy link
Member

insspb commented May 27, 2020

@ssbarnea Please do not close PRs silently without any resolution.
This PR is related to #1159 and tests from here can be used there as second recheck.

utils.rmtree('cookiecutter-pypackage')


def test_hg_clone_does_not_change_line_endings_on_win():
Copy link
Member

Choose a reason for hiding this comment

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

This is critical and unacceptable. External executable should not be used in tests (hg in this case)

Copy link
Member

Choose a reason for hiding this comment

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

Fixed in #1407



def test_git_clone_does_not_change_line_endings_on_win():
repo_dir = vcs.clone(
Copy link
Member

Choose a reason for hiding this comment

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

This is critical and unacceptable. External executable should not be used in tests (git in this case)

Copy link
Member

Choose a reason for hiding this comment

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

Fixed in #1407

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@insspb you are correct ... and way back then, I might have been lazy to use mocks ;)
Thank you for picking up the ball and I am glad this was of some use after all.

@insspb
Copy link
Member

insspb commented May 27, 2020

Restored as #1407

@insspb insspb closed this May 27, 2020
@insspb insspb added this to the 2.0.0 milestone May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows This issue/PR related to windows systems only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants