Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyodide
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
pyodide
Commits
56597e2d
Commit
56597e2d
authored
Aug 23, 2018
by
Roman Yurchak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use NamedTemporaryFile in pytest
parent
57617053
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
packages/pytest/meta.yaml
packages/pytest/meta.yaml
+3
-0
packages/pytest/patches/use-named-temporary-file.patch
packages/pytest/patches/use-named-temporary-file.patch
+26
-0
No files found.
packages/pytest/meta.yaml
View file @
56597e2d
...
...
@@ -6,6 +6,9 @@ source:
url
:
https://files.pythonhosted.org/packages/55/50/399419c03c39bf41faa7cbd5a8976c076037b2d76adf2535610919806d67/pytest-3.6.3.tar.gz
md5
:
8ca6124a3a80f9555c50f5c09056ea02
patches
:
-
patches/use-named-temporary-file.patch
requirements
:
run
:
-
atomicwrites
...
...
packages/pytest/patches/use-named-temporary-file.patch
0 → 100644
View file @
56597e2d
diff --git a/src/_pytest/capture.py b/src/_pytest/capture.py
index faa767a8..23298939 100644
--- a/src/_pytest/capture.py
+++ b/src/_pytest/capture.py
@@ -10,7 +10,7 @@
import sys
import os
import io
from io import UnsupportedOperation
-from tempfile import TemporaryFile
+from tempfile import NamedTemporaryFile as TemporaryFile
import six
import pytest
diff --git a/src/_pytest/pastebin.py b/src/_pytest/pastebin.py
index 6af202d1..9b192918 100644
--- a/src/_pytest/pastebin.py
+++ b/src/_pytest/pastebin.py
@@ -29,7 +29,7 @@
def pytest_configure(config):
# when using pytest-xdist, for example
if tr is not None:
# pastebin file will be utf-8 encoded binary file
- config._pastebinfile = tempfile.TemporaryFile("w+b")
+ config._pastebinfile = tempfile.NamedTemporaryFile("w+b")
oldwrite = tr._tw.write
def tee_write(s, **kwargs):
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment