mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Merge pull request #2808 from BoboTiG/fix-resource-warnings-tests
Fix 2 ResourceWarning: unclosed file, in tests
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Fix 2 ResourceWarning: unclosed file, in tests.
|
||||
@@ -210,9 +210,10 @@ Requests = "==2.14.0" # Inline comment
|
||||
c = p.pipenv("install python_DateUtil")
|
||||
assert c.return_code == 0
|
||||
assert "python-dateutil" in p.pipfile["packages"]
|
||||
contents = open(p.pipfile_path).read()
|
||||
assert "# Pre comment" in contents
|
||||
assert "# Inline comment" in contents
|
||||
with open(p.pipfile_path) as f:
|
||||
contents = f.read()
|
||||
assert "# Pre comment" in contents
|
||||
assert "# Inline comment" in contents
|
||||
|
||||
|
||||
@pytest.mark.files
|
||||
|
||||
@@ -148,6 +148,7 @@ python_DateUtil = "*" # Inline comment
|
||||
c = p.pipenv("uninstall python_dateutil")
|
||||
assert "Requests" in p.pipfile["packages"]
|
||||
assert "python_DateUtil" not in p.pipfile["packages"]
|
||||
contents = open(p.pipfile_path).read()
|
||||
assert "# Pre comment" in contents
|
||||
assert "# Inline comment" in contents
|
||||
with open(p.pipfile_path) as f:
|
||||
contents = f.read()
|
||||
assert "# Pre comment" in contents
|
||||
assert "# Inline comment" in contents
|
||||
|
||||
Reference in New Issue
Block a user