Commit 4404274e authored by Roman Yurchak's avatar Roman Yurchak

Package nose

parent 4dd93ca9
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
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
......
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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment