Merge pull request #3893 from jirikuncar/3892-macos
travis: run tests on macOS
This commit is contained in:
commit
b77e533693
15
.travis.yml
15
.travis.yml
|
@ -44,6 +44,21 @@ jobs:
|
||||||
python: '3.7'
|
python: '3.7'
|
||||||
sudo: required
|
sudo: required
|
||||||
dist: xenial
|
dist: xenial
|
||||||
|
- &test-macos
|
||||||
|
language: generic
|
||||||
|
os: osx
|
||||||
|
osx_image: xcode9.4
|
||||||
|
sudo: required
|
||||||
|
install:
|
||||||
|
- python -m pip install --pre tox
|
||||||
|
env: TOXENV=py27
|
||||||
|
- <<: *test-macos
|
||||||
|
env: TOXENV=py37
|
||||||
|
before_install:
|
||||||
|
- brew update
|
||||||
|
- brew upgrade python
|
||||||
|
- brew unlink python
|
||||||
|
- brew link python
|
||||||
|
|
||||||
- stage: deploy
|
- stage: deploy
|
||||||
python: '3.6'
|
python: '3.6'
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Fix macOS specific code using ``capturemanager`` plugin in doctests.
|
|
@ -203,7 +203,8 @@ class DoctestItem(pytest.Item):
|
||||||
return
|
return
|
||||||
capman = self.config.pluginmanager.getplugin("capturemanager")
|
capman = self.config.pluginmanager.getplugin("capturemanager")
|
||||||
if capman:
|
if capman:
|
||||||
out, err = capman.suspend_global_capture(in_=True)
|
capman.suspend_global_capture(in_=True)
|
||||||
|
out, err = capman.read_global_capture()
|
||||||
sys.stdout.write(out)
|
sys.stdout.write(out)
|
||||||
sys.stderr.write(err)
|
sys.stderr.write(err)
|
||||||
|
|
||||||
|
|
|
@ -1584,6 +1584,7 @@ class TestFixtureManagerParseFactories(object):
|
||||||
values = []
|
values = []
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
testdir.syspathinsert(testdir.tmpdir.dirname)
|
||||||
package = testdir.mkdir("package")
|
package = testdir.mkdir("package")
|
||||||
package.join("__init__.py").write("")
|
package.join("__init__.py").write("")
|
||||||
package.join("conftest.py").write(
|
package.join("conftest.py").write(
|
||||||
|
|
Loading…
Reference in New Issue