File: test_pytester_plugin.py

package info (click to toggle)
python-flaky 3.3.0-1~bpo8%2B1
  • links: PTS
  • area: main
  • in suites: jessie-backports
  • size: 388 kB
  • sloc: python: 1,947; makefile: 6
file content (20 lines) | stat: -rw-r--r-- 467 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# coding: utf-8

from __future__ import unicode_literals, absolute_import

pytest_plugins = str('pytester')  # pylint:disable=invalid-name

TESTSUITE = """
def test_a_thing():
    pass

"""


def test_output_without_capture(testdir):
    """
    Test for Issue #82. Flaky was breaking tests using the pytester plugin.
    """
    script = testdir.makepyfile(TESTSUITE)
    result = testdir.runpytest(script, '--verbose', '--capture', 'fd')
    assert result.ret == 0