Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aba4581

Browse files
committed
Merge markup fixes in unittest doc from 3.2.
2 parents 7b3e571 + fed69ba commit aba4581

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Doc/library/unittest.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ that is broken and will fail, but shouldn't be counted as a failure on a
476476
Skipping a test is simply a matter of using the :func:`skip` :term:`decorator`
477477
or one of its conditional variants.
478478

479-
Basic skipping looks like this: ::
479+
Basic skipping looks like this::
480480

481481
class MyTestCase(unittest.TestCase):
482482

@@ -495,7 +495,7 @@ Basic skipping looks like this: ::
495495
# windows specific testing code
496496
pass
497497

498-
This is the output of running the example above in verbose mode: ::
498+
This is the output of running the example above in verbose mode::
499499

500500
test_format (__main__.MyTestCase) ... skipped 'not supported in this library version'
501501
test_nothing (__main__.MyTestCase) ... skipped 'demonstrating skipping'
@@ -506,7 +506,7 @@ This is the output of running the example above in verbose mode: ::
506506

507507
OK (skipped=3)
508508

509-
Classes can be skipped just like methods: ::
509+
Classes can be skipped just like methods::
510510

511511
@unittest.skip("showing class skipping")
512512
class MySkippedTestCase(unittest.TestCase):
@@ -525,7 +525,7 @@ Expected failures use the :func:`expectedFailure` decorator. ::
525525

526526
It's easy to roll your own skipping decorators by making a decorator that calls
527527
:func:`skip` on the test when it wants it to be skipped. This decorator skips
528-
the test unless the passed object has a certain attribute: ::
528+
the test unless the passed object has a certain attribute::
529529

530530
def skipUnlessHasattr(obj, attr):
531531
if hasattr(obj, attr):

0 commit comments

Comments
 (0)