From 536d6febc3d4143d522652d64470abc1cfe18dd7 Mon Sep 17 00:00:00 2001 From: Kyle Altendorf Date: Thu, 3 May 2018 08:38:33 -0700 Subject: [PATCH] Revert "Update newline tests" This reverts commit 18704a5e21720b6fbc7dc62e6f345dc284020dc5. --- tests/integration/test_project.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/integration/test_project.py b/tests/integration/test_project.py index eb8f195a..c9c95e7c 100644 --- a/tests/integration/test_project.py +++ b/tests/integration/test_project.py @@ -83,25 +83,25 @@ six = {{version = "*", index = "pypi"}} def test_maintain_file_line_endings(PipenvInstance, pypi, newlines, target): with PipenvInstance(pypi=pypi, chdir=True) as p: path = getattr(p, target) + c = p.pipenv('install') assert c.return_code == 0 with io.open(path) as f: contents = f.read() - written_newlines = f.newlines assert f.newlines == u'\n' - if target == 'lockfile_path': - project = Project() - project._lockfile_newlines = newlines - project.write_lockfile(contents) - else: - with io.open(path, 'w', newline=newlines) as f: - f.write(contents) + + with io.open(path, 'w', newline=newlines) as f: + f.write(contents) + + before = os.path.getmtime(path) c = p.pipenv('install chardet') assert c.return_code == 0 + assert os.path.getmtime(path) != before + with io.open(path) as f: f.read() actual_newlines = f.newlines