Skip to content

Commit 183750f

Browse files
authored
CSS changes to the API reference (#5609)
CSS changes to the API reference
2 parents 7440cec + bb7608c commit 183750f

File tree

6 files changed

+63
-18
lines changed

6 files changed

+63
-18
lines changed

CHANGELOG.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
=================
2-
Changelog history
3-
=================
1+
=========
2+
Changelog
3+
=========
44

55
Versions follow `Semantic Versioning <https://semver.org/>`_ (``<major>.<minor>.<patch>``).
66

doc/en/_templates/globaltoc.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ <h3><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3>
44
<li><a href="{{ pathto('index') }}">Home</a></li>
55
<li><a href="{{ pathto('getting-started') }}">Install</a></li>
66
<li><a href="{{ pathto('contents') }}">Contents</a></li>
7-
<li><a href="{{ pathto('reference') }}">Reference</a></li>
7+
<li><a href="{{ pathto('reference') }}">API Reference</a></li>
88
<li><a href="{{ pathto('example/index') }}">Examples</a></li>
99
<li><a href="{{ pathto('customize') }}">Customize</a></li>
1010
<li><a href="{{ pathto('changelog') }}">Changelog</a></li>

doc/en/_themes/flask/static/flasky.css_t

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,12 +424,56 @@ a:hover tt {
424424
background: #EEE;
425425
}
426426

427+
#reference div.section h2 {
428+
/* separate code elements in the reference section */
429+
border-top: 2px solid #ccc;
430+
padding-top: 0.5em;
431+
}
432+
427433
#reference div.section h3 {
428434
/* separate code elements in the reference section */
429435
border-top: 1px solid #ccc;
430436
padding-top: 0.5em;
431437
}
432438

439+
dl.class, dl.function {
440+
margin-top: 1em;
441+
margin-bottom: 1em;
442+
}
443+
444+
dl.class > dd {
445+
border-left: 3px solid #ccc;
446+
margin-left: 0px;
447+
padding-left: 30px;
448+
}
449+
450+
dl.field-list {
451+
flex-direction: column;
452+
}
453+
454+
dl.field-list dd {
455+
padding-left: 4em;
456+
border-left: 3px solid #ccc;
457+
margin-bottom: 0.5em;
458+
}
459+
460+
dl.field-list dd > ul {
461+
list-style: none;
462+
padding-left: 0px;
463+
}
464+
465+
dl.field-list dd > ul > li li :first-child {
466+
text-indent: 0;
467+
}
468+
469+
dl.field-list dd > ul > li :first-child {
470+
text-indent: -2em;
471+
padding-left: 0px;
472+
}
473+
474+
dl.field-list dd > p:first-child {
475+
text-indent: -2em;
476+
}
433477

434478
@media screen and (max-width: 870px) {
435479

doc/en/reference.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Reference
2-
=========
1+
API Reference
2+
=============
33

44
This page contains the full reference to pytest's API.
55

src/_pytest/mark/structures.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -193,17 +193,18 @@ def test_function():
193193
pass
194194
195195
When a MarkDecorator instance is called it does the following:
196-
1. If called with a single class as its only positional argument and no
197-
additional keyword arguments, it attaches itself to the class so it
198-
gets applied automatically to all test cases found in that class.
199-
2. If called with a single function as its only positional argument and
200-
no additional keyword arguments, it attaches a MarkInfo object to the
201-
function, containing all the arguments already stored internally in
202-
the MarkDecorator.
203-
3. When called in any other case, it performs a 'fake construction' call,
204-
i.e. it returns a new MarkDecorator instance with the original
205-
MarkDecorator's content updated with the arguments passed to this
206-
call.
196+
197+
1. If called with a single class as its only positional argument and no
198+
additional keyword arguments, it attaches itself to the class so it
199+
gets applied automatically to all test cases found in that class.
200+
2. If called with a single function as its only positional argument and
201+
no additional keyword arguments, it attaches a MarkInfo object to the
202+
function, containing all the arguments already stored internally in
203+
the MarkDecorator.
204+
3. When called in any other case, it performs a 'fake construction' call,
205+
i.e. it returns a new MarkDecorator instance with the original
206+
MarkDecorator's content updated with the arguments passed to this
207+
call.
207208
208209
Note: The rules above prevent MarkDecorator objects from storing only a
209210
single function or class reference as their positional argument with no

src/_pytest/python_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ def raises(expected_exception, *args, **kwargs):
542542
string that may contain `special characters`__, the pattern can
543543
first be escaped with ``re.escape``.
544544
545-
__ https://docs.python.org/3/library/re.html#regular-expression-syntax
545+
__ https://docs.python.org/3/library/re.html#regular-expression-syntax
546546
547547
:kwparam message: **(deprecated since 4.1)** if specified, provides a custom failure message
548548
if the exception is not raised. See :ref:`the deprecation docs <raises message deprecated>` for a workaround.

0 commit comments

Comments
 (0)