summaryrefslogtreecommitdiff
path: root/doc/en/example/special.rst
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2018-11-22 00:15:14 -0800
committerAnthony Sottile <asottile@umich.edu>2018-11-22 00:15:14 -0800
commitb3700f61baca9920c421257d1cd8bb00c44d51bc (patch)
tree3fa9a09bc284685983e88e92a4f59dcb3db8db57 /doc/en/example/special.rst
parent3eaa6d883542147b376cb43c4e9e95a9dd8d7d40 (diff)
downloadpytest-b3700f61baca9920c421257d1cd8bb00c44d51bc.tar.gz
Fix formatting of print() calls
Diffstat (limited to 'doc/en/example/special.rst')
-rw-r--r--doc/en/example/special.rst16
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/en/example/special.rst b/doc/en/example/special.rst
index 1fc32f6c8..524ae7883 100644
--- a/doc/en/example/special.rst
+++ b/doc/en/example/special.rst
@@ -13,7 +13,7 @@ calls it::
@pytest.fixture(scope="session", autouse=True)
def callattr_ahead_of_alltests(request):
- print ("callattr_ahead_of_alltests called")
+ print("callattr_ahead_of_alltests called")
seen = set([None])
session = request.node
for item in session.items:
@@ -31,20 +31,20 @@ will be called ahead of running any tests::
class TestHello(object):
@classmethod
def callme(cls):
- print ("callme called!")
+ print("callme called!")
def test_method1(self):
- print ("test_method1 called")
+ print("test_method1 called")
def test_method2(self):
- print ("test_method1 called")
+ print("test_method1 called")
class TestOther(object):
@classmethod
def callme(cls):
- print ("callme other called")
+ print("callme other called")
def test_other(self):
- print ("test other")
+ print("test other")
# works with unittest as well ...
import unittest
@@ -52,10 +52,10 @@ will be called ahead of running any tests::
class SomeTest(unittest.TestCase):
@classmethod
def callme(self):
- print ("SomeTest callme called")
+ print("SomeTest callme called")
def test_unit1(self):
- print ("test_unit1 method called")
+ print("test_unit1 method called")
If you run this without output capturing::