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
4404274e
Commit
4404274e
authored
Aug 23, 2018
by
Roman Yurchak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Package nose
parent
4dd93ca9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
1 deletion
+61
-1
packages/nose/meta.yaml
packages/nose/meta.yaml
+15
-0
packages/pytest/patches/use-named-temporary-file.patch
packages/pytest/patches/use-named-temporary-file.patch
+32
-1
test/test_testing.py
test/test_testing.py
+14
-0
No files found.
packages/nose/meta.yaml
0 → 100644
View file @
4404274e
package
:
name
:
nose
version
:
1.3.7
source
:
url
:
https://pypi.io/packages/source/n/nose/nose-1.3.7.tar.gz
sha256
:
f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98
requirements
:
run
:
-
setuptools
test
:
imports
:
-
nose
packages/pytest/patches/use-named-temporary-file.patch
View file @
4404274e
diff --git a/src/_pytest/capture.py b/src/_pytest/capture.py
index faa767a8..
23298939
100644
index faa767a8..
551484b0
100644
--- a/src/_pytest/capture.py
+++ b/src/_pytest/capture.py
@@ -10,7 +10,7 @@
import sys
...
...
@@ -11,6 +11,37 @@ index faa767a8..23298939 100644
import six
import pytest
@@ -482,7 +482,7 @@
class FDCaptureBinary(object):
os.fstat(self.targetfd_save)
except (AttributeError, OSError):
raise ValueError("saved filedescriptor not valid anymore")
- os.dup2(self.tmpfile_fd, self.targetfd)
+ self.tmpfile_fd = os.dup(self.targetfd)
self.syscapture.start()
def snap(self):
@@ -496,18 +496,18 @@
class FDCaptureBinary(object):
""" stop capturing, restore streams, return original capture file,
seeked to position zero. """
targetfd_save = self.__dict__.pop("targetfd_save")
- os.dup2(targetfd_save, self.targetfd)
+ targetfd_save = os.dup(self.targetfd)
os.close(targetfd_save)
self.syscapture.done()
_attempt_to_close_capture_file(self.tmpfile)
def suspend(self):
self.syscapture.suspend()
- os.dup2(self.targetfd_save, self.targetfd)
+ self.targetfd_save = os.dup(self.targetfd)
def resume(self):
self.syscapture.resume()
- os.dup2(self.tmpfile_fd, self.targetfd)
+ self.tmpfile_fd = os.dup(self.targetfd)
def writeorg(self, data):
""" write to original file descriptor. """
diff --git a/src/_pytest/pastebin.py b/src/_pytest/pastebin.py
index 6af202d1..9b192918 100644
--- a/src/_pytest/pastebin.py
...
...
test/test_
packag
ing.py
→
test/test_
test
ing.py
View file @
4404274e
def
test_pytest
(
selenium
):
selenium
.
load_package
(
'pytest'
)
selenium
.
load_package
(
'pandas'
)
selenium
.
load_package
(
'numpy'
)
selenium
.
load_package
(
'nose'
)
selenium
.
run
(
'from pathlib import Path'
)
selenium
.
run
(
'import os'
)
selenium
.
run
(
'import
pandas as pd
'
)
selenium
.
run
(
'base_dir = Path(
pd.__file__).parent / "tests" / "frame
"'
)
selenium
.
run
(
'import
numpy
'
)
selenium
.
run
(
'base_dir = Path(
numpy.__file__).parent / "core" / "tests
"'
)
selenium
.
run
(
'print(base_dir)'
)
selenium
.
run
(
'print(list(sorted(os.listdir(base_dir))))'
)
selenium
.
run
(
"import pytest;"
"pytest.main([base_dir / 'test_sorting.py'])"
)
"pytest.main([base_dir / 'test_api.py'])"
)
logs
=
'
\
n
'
.
join
(
selenium
.
logs
)
assert
'INTERNALERROR'
not
in
logs
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