Changeset 3b9b2bd in rtems-central


Ignore:
Timestamp:
Apr 30, 2020, 4:53:40 AM (6 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
22ec40f
Parents:
b3f5b7e
git-author:
Sebastian Huber <sebastian.huber@…> (04/30/20 04:53:40)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/28/20 08:34:46)
Message:

tests: Fix issues found by flake8

Location:
rtemsqual/tests
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • rtemsqual/tests/test_applconfig.py

    rb3f5b7e r3b9b2bd  
    4747
    4848    with open(g_rst, "r") as src:
    49         content = (
    50             ".. SPDX-License-Identifier: CC-BY-SA-4.0\n"
    51             "\n"
    52             ".. Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)\n"
    53             "\n"
    54             "group name\n"
    55             "==========\n"
    56             "\n"
    57             "description\n"
    58             "\n"
    59             ".. index:: a\n"
    60             ".. index:: index a\n"
    61             "\n"
    62             ".. _a:\n"
    63             "\n"
    64             "a\n"
    65             "-\n"
    66             "\n"
    67             "CONSTANT:\n"
    68             "    ``a``\n"
    69             "\n"
    70             "OPTION TYPE:\n"
    71             "    This configuration option is a boolean feature define.\n"
    72             "\n"
    73             "DEFAULT CONFIGURATION:\n"
    74             "    default a\n"
    75             "\n"
    76             "DESCRIPTION:\n"
    77             "    description a\n"
    78             "\n"
    79             "NOTES:\n"
    80             "    notes a\n"
    81             "\n"
    82             ".. index:: b\n"
    83             "\n"
    84             ".. _b:\n"
    85             "\n"
    86             "b\n"
    87             "-\n"
    88             "\n"
    89             "CONSTANT:\n"
    90             "    ``b``\n"
    91             "\n"
    92             "OPTION TYPE:\n"
    93             "    This configuration option is a boolean feature define.\n"
    94             "\n"
    95             "DEFAULT CONFIGURATION:\n"
    96             "    If this configuration option is undefined, then the described feature is not\n"
    97             "    enabled.\n"
    98             "\n"
    99             "DESCRIPTION:\n"
    100             "    description b\n"
    101             "\n"
    102             "NOTES:\n"
    103             "    None.\n"
    104             "\n"
    105             ".. index:: c\n"
    106             "\n"
    107             ".. _c:\n"
    108             "\n"
    109             "c\n"
    110             "-\n"
    111             "\n"
    112             "CONSTANT:\n"
    113             "    ``c``\n"
    114             "\n"
    115             "OPTION TYPE:\n"
    116             "    This configuration option is an integer define.\n"
    117             "\n"
    118             "DEFAULT VALUE:\n"
    119             "    The default value is 13.\n"
    120             "\n"
    121             "VALUE CONSTRAINTS:\n"
    122             "    The value of this configuration option shall satisfy all of the following\n"
    123             "    constraints:\n"
    124             "\n"
    125             "    * It shall be greater than or equal to -1.\n"
    126             "\n"
    127             "    * It shall be less than or equal to 99.\n"
    128             "\n"
    129             "    * custom c 1\n"
    130             "\n"
    131             "    * custom c 2\n"
    132             "\n"
    133             "    * constraint d\n"
    134             "\n"
    135             "DESCRIPTION:\n"
    136             "    description c\n"
    137             "\n"
    138             "NOTES:\n"
    139             "    notes c\n"
    140             "\n"
    141             ".. index:: e\n"
    142             "\n"
    143             ".. _e:\n"
    144             "\n"
    145             "e\n"
    146             "-\n"
    147             "\n"
    148             "CONSTANT:\n"
    149             "    ``e``\n"
    150             "\n"
    151             "OPTION TYPE:\n"
    152             "    This configuration option is an integer define.\n"
    153             "\n"
    154             "DEFAULT VALUE:\n"
    155             "    The default value is 7.\n"
    156             "\n"
    157             "VALUE CONSTRAINTS:\n"
    158             "    The value of this configuration option shall be greater than or equal to -2.\n"
    159             "\n"
    160             "DESCRIPTION:\n"
    161             "    description e\n"
    162             "\n"
    163             "NOTES:\n"
    164             "    None.\n"
    165             "\n"
    166             ".. index:: f\n"
    167             "\n"
    168             ".. _f:\n"
    169             "\n"
    170             "f\n"
    171             "-\n"
    172             "\n"
    173             "CONSTANT:\n"
    174             "    ``f``\n"
    175             "\n"
    176             "OPTION TYPE:\n"
    177             "    This configuration option is an integer define.\n"
    178             "\n"
    179             "DEFAULT VALUE:\n"
    180             "    The default value is 1.\n"
    181             "\n"
    182             "VALUE CONSTRAINTS:\n"
    183             "    The value of this configuration option shall be less than or equal to 2.\n"
    184             "\n"
    185             "DESCRIPTION:\n"
    186             "    description f\n"
    187             "\n"
    188             "NOTES:\n"
    189             "    None.\n"
    190             "\n"
    191             ".. index:: h\n"
    192             "\n"
    193             ".. _h:\n"
    194             "\n"
    195             "h\n"
    196             "-\n"
    197             "\n"
    198             "CONSTANT:\n"
    199             "    ``h``\n"
    200             "\n"
    201             "OPTION TYPE:\n"
    202             "    This configuration option is an integer define.\n"
    203             "\n"
    204             "DEFAULT VALUE:\n"
    205             "    The default value is 1.\n"
    206             "\n"
    207             "VALUE CONSTRAINTS:\n"
    208             "    custom h\n"
    209             "\n"
    210             "DESCRIPTION:\n"
    211             "    description h\n"
    212             "\n"
    213             "NOTES:\n"
    214             "    None.\n"
    215             "\n"
    216             ".. index:: i\n"
    217             "\n"
    218             ".. _i:\n"
    219             "\n"
    220             "i\n"
    221             "-\n"
    222             "\n"
    223             "CONSTANT:\n"
    224             "    ``i``\n"
    225             "\n"
    226             "OPTION TYPE:\n"
    227             "    This configuration option is an integer define.\n"
    228             "\n"
    229             "DEFAULT VALUE:\n"
    230             "    The default value is 1.\n"
    231             "\n"
    232             "VALUE CONSTRAINTS:\n"
    233             "    The value of this configuration option shall be\n"
    234             "    an element of {1, 2, 3}.\n"
    235             "\n"
    236             "DESCRIPTION:\n"
    237             "    description i\n"
    238             "\n"
    239             "NOTES:\n"
    240             "    None.\n"
    241             "\n"
    242             ".. index:: j\n"
    243             "\n"
    244             ".. _j:\n"
    245             "\n"
    246             "j\n"
    247             "-\n"
    248             "\n"
    249             "CONSTANT:\n"
    250             "    ``j``\n"
    251             "\n"
    252             "OPTION TYPE:\n"
    253             "    This configuration option is an integer define.\n"
    254             "\n"
    255             "DEFAULT VALUE:\n"
    256             "    Foo bar.\n"
    257             "\n"
    258             "VALUE CONSTRAINTS:\n"
    259             "    The value of this configuration option shall satisfy all of the following\n"
    260             "    constraints:\n"
    261             "\n"
    262             "    * It shall be an element of [1, 2].\n"
    263             "\n"
    264             "    * constraint d\n"
    265             "\n"
    266             "DESCRIPTION:\n"
    267             "    description j\n"
    268             "\n"
    269             "NOTES:\n"
    270             "    None.\n"
    271             "\n"
    272             ".. index:: k\n"
    273             "\n"
    274             ".. _k:\n"
    275             "\n"
    276             "k\n"
    277             "-\n"
    278             "\n"
    279             "CONSTANT:\n"
    280             "    ``k``\n"
    281             "\n"
    282             "OPTION TYPE:\n"
    283             "    This configuration option is an integer define.\n"
    284             "\n"
    285             "DEFAULT VALUE:\n"
    286             "    The default value is 1.\n"
    287             "\n"
    288             "VALUE CONSTRAINTS:\n"
    289             "    The value of this configuration option shall satisfy all of the following\n"
    290             "    constraints:\n"
    291             "\n"
    292             "    * custom k 1\n"
    293             "\n"
    294             "    * custom k 2\n"
    295             "\n"
    296             "DESCRIPTION:\n"
    297             "    description k\n"
    298             "\n"
    299             "NOTES:\n"
    300             "    None.\n"
    301             "\n"
    302             ".. index:: l\n"
    303             "\n"
    304             ".. _l:\n"
    305             "\n"
    306             "l\n"
    307             "-\n"
    308             "\n"
    309             "CONSTANT:\n"
    310             "    ``l``\n"
    311             "\n"
    312             "OPTION TYPE:\n"
    313             "    This configuration option is an initializer define.\n"
    314             "\n"
    315             "DEFAULT VALUE:\n"
    316             "    The default value is 1.\n"
    317             "\n"
    318             "VALUE CONSTRAINTS:\n"
    319             "    The value of this configuration option shall be greater than or equal to 0\n"
    320             "    and less than or equal to 2.\n"
    321             "\n"
    322             "DESCRIPTION:\n"
    323             "    description l\n"
    324             "\n"
    325             "NOTES:\n"
    326             "    None.\n"
    327             "\n"
    328             ".. index:: m\n"
    329             "\n"
    330             ".. _m:\n"
    331             "\n"
    332             "m\n"
    333             "-\n"
    334             "\n"
    335             "CONSTANT:\n"
    336             "    ``m``\n"
    337             "\n"
    338             "OPTION TYPE:\n"
    339             "    This configuration option is an initializer define.\n"
    340             "\n"
    341             "DEFAULT VALUE:\n"
    342             "    The default value is 1.\n"
    343             "\n"
    344             "DESCRIPTION:\n"
    345             "    description m\n"
    346             "\n"
    347             "NOTES:\n"
    348             "    None.\n")
     49        content = """.. SPDX-License-Identifier: CC-BY-SA-4.0
     50
     51.. Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
     52
     53group name
     54==========
     55
     56description
     57
     58.. index:: a
     59.. index:: index a
     60
     61.. _a:
     62
     63a
     64-
     65
     66CONSTANT:
     67    ``a``
     68
     69OPTION TYPE:
     70    This configuration option is a boolean feature define.
     71
     72DEFAULT CONFIGURATION:
     73    default a
     74
     75DESCRIPTION:
     76    description a
     77
     78NOTES:
     79    notes a
     80
     81.. index:: b
     82
     83.. _b:
     84
     85b
     86-
     87
     88CONSTANT:
     89    ``b``
     90
     91OPTION TYPE:
     92    This configuration option is a boolean feature define.
     93
     94DEFAULT CONFIGURATION:
     95    If this configuration option is undefined, then the described feature is \
     96not
     97    enabled.
     98
     99DESCRIPTION:
     100    description b
     101
     102NOTES:
     103    None.
     104
     105.. index:: c
     106
     107.. _c:
     108
     109c
     110-
     111
     112CONSTANT:
     113    ``c``
     114
     115OPTION TYPE:
     116    This configuration option is an integer define.
     117
     118DEFAULT VALUE:
     119    The default value is 13.
     120
     121VALUE CONSTRAINTS:
     122    The value of this configuration option shall satisfy all of the following
     123    constraints:
     124
     125    * It shall be greater than or equal to -1.
     126
     127    * It shall be less than or equal to 99.
     128
     129    * custom c 1
     130
     131    * custom c 2
     132
     133    * constraint d
     134
     135DESCRIPTION:
     136    description c
     137
     138NOTES:
     139    notes c
     140
     141.. index:: e
     142
     143.. _e:
     144
     145e
     146-
     147
     148CONSTANT:
     149    ``e``
     150
     151OPTION TYPE:
     152    This configuration option is an integer define.
     153
     154DEFAULT VALUE:
     155    The default value is 7.
     156
     157VALUE CONSTRAINTS:
     158    The value of this configuration option shall be greater than or equal to \
     159-2.
     160
     161DESCRIPTION:
     162    description e
     163
     164NOTES:
     165    None.
     166
     167.. index:: f
     168
     169.. _f:
     170
     171f
     172-
     173
     174CONSTANT:
     175    ``f``
     176
     177OPTION TYPE:
     178    This configuration option is an integer define.
     179
     180DEFAULT VALUE:
     181    The default value is 1.
     182
     183VALUE CONSTRAINTS:
     184    The value of this configuration option shall be less than or equal to 2.
     185
     186DESCRIPTION:
     187    description f
     188
     189NOTES:
     190    None.
     191
     192.. index:: h
     193
     194.. _h:
     195
     196h
     197-
     198
     199CONSTANT:
     200    ``h``
     201
     202OPTION TYPE:
     203    This configuration option is an integer define.
     204
     205DEFAULT VALUE:
     206    The default value is 1.
     207
     208VALUE CONSTRAINTS:
     209    custom h
     210
     211DESCRIPTION:
     212    description h
     213
     214NOTES:
     215    None.
     216
     217.. index:: i
     218
     219.. _i:
     220
     221i
     222-
     223
     224CONSTANT:
     225    ``i``
     226
     227OPTION TYPE:
     228    This configuration option is an integer define.
     229
     230DEFAULT VALUE:
     231    The default value is 1.
     232
     233VALUE CONSTRAINTS:
     234    The value of this configuration option shall be
     235    an element of {1, 2, 3}.
     236
     237DESCRIPTION:
     238    description i
     239
     240NOTES:
     241    None.
     242
     243.. index:: j
     244
     245.. _j:
     246
     247j
     248-
     249
     250CONSTANT:
     251    ``j``
     252
     253OPTION TYPE:
     254    This configuration option is an integer define.
     255
     256DEFAULT VALUE:
     257    Foo bar.
     258
     259VALUE CONSTRAINTS:
     260    The value of this configuration option shall satisfy all of the following
     261    constraints:
     262
     263    * It shall be an element of [1, 2].
     264
     265    * constraint d
     266
     267DESCRIPTION:
     268    description j
     269
     270NOTES:
     271    None.
     272
     273.. index:: k
     274
     275.. _k:
     276
     277k
     278-
     279
     280CONSTANT:
     281    ``k``
     282
     283OPTION TYPE:
     284    This configuration option is an integer define.
     285
     286DEFAULT VALUE:
     287    The default value is 1.
     288
     289VALUE CONSTRAINTS:
     290    The value of this configuration option shall satisfy all of the following
     291    constraints:
     292
     293    * custom k 1
     294
     295    * custom k 2
     296
     297DESCRIPTION:
     298    description k
     299
     300NOTES:
     301    None.
     302
     303.. index:: l
     304
     305.. _l:
     306
     307l
     308-
     309
     310CONSTANT:
     311    ``l``
     312
     313OPTION TYPE:
     314    This configuration option is an initializer define.
     315
     316DEFAULT VALUE:
     317    The default value is 1.
     318
     319VALUE CONSTRAINTS:
     320    The value of this configuration option shall be greater than or equal to 0
     321    and less than or equal to 2.
     322
     323DESCRIPTION:
     324    description l
     325
     326NOTES:
     327    None.
     328
     329.. index:: m
     330
     331.. _m:
     332
     333m
     334-
     335
     336CONSTANT:
     337    ``m``
     338
     339OPTION TYPE:
     340    This configuration option is an initializer define.
     341
     342DEFAULT VALUE:
     343    The default value is 1.
     344
     345DESCRIPTION:
     346    description m
     347
     348NOTES:
     349    None.
     350"""
    349351        assert content == src.read()
  • rtemsqual/tests/test_content_c.py

    rb3f5b7e r3b9b2bd  
    122122    content.add_brief_description(
    123123        "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT "
    124         "HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, "
    125         "INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY "
    126         "AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.")
     124        "HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED "
     125        "WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES "
     126        "OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE "
     127        "DISCLAIMED.")
    127128    assert content.content == """ *
    128129 * @brief THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
  • rtemsqual/tests/test_content_sphinx.py

    rb3f5b7e r3b9b2bd  
    9898        sc.register_license("x")
    9999    sc.register_license("CC-BY-SA-4.0")
    100     assert "" == sc.content
     100    assert sc.content == ""
    101101    sc.add_licence_and_copyrights()
    102102    assert ".. SPDX-License-Identifier: CC-BY-SA-4.0\n\n" == sc.content
     
    108108        sc.register_license("x")
    109109    sc.register_copyright("Copyright (C) A")
    110     assert "" == sc.content
     110    assert sc.content == ""
    111111    sc.add_licence_and_copyrights()
    112     assert ".. SPDX-License-Identifier: CC-BY-SA-4.0\n\n.. Copyright (C) A\n\n" == sc.content
     112    assert sc.content == """.. SPDX-License-Identifier: CC-BY-SA-4.0
     113
     114.. Copyright (C) A
     115
     116"""
    113117
    114118
  • rtemsqual/tests/test_glossary.py

    rb3f5b7e r3b9b2bd  
    5353
    5454    with open(project_glossary, "r") as src:
    55         content = (
    56             ".. SPDX-License-Identifier: CC-BY-SA-4.0\n"
    57             "\n"
    58             ".. Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)\n"
    59             "\n"
    60             "Glossary\n"
    61             "********\n"
    62             "\n"
    63             ".. glossary::\n"
    64             "    :sorted:\n"
    65             "\n"
    66             "    T\n"
    67             "        Term text @:term:`U`.\n"
    68             "\n"
    69             "    U\n"
    70             "        Term text U.\n"
    71             "\n"
    72             "    V\n"
    73             "        Term text V.\n")
     55        content = """.. SPDX-License-Identifier: CC-BY-SA-4.0
     56
     57.. Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
     58
     59Glossary
     60********
     61
     62.. glossary::
     63    :sorted:
     64
     65    T
     66        Term text @:term:`U`.
     67
     68    U
     69        Term text U.
     70
     71    V
     72        Term text V.
     73"""
    7474        assert content == src.read()
    7575
    7676    with open(document_glossary, "r") as src:
    77         content = (
    78             ".. SPDX-License-Identifier: CC-BY-SA-4.0\n"
    79             "\n"
    80             ".. Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)\n"
    81             "\n"
    82             "Glossary\n"
    83             "********\n"
    84             "\n"
    85             ".. glossary::\n"
    86             "    :sorted:\n"
    87             "\n"
    88             "    T\n"
    89             "        Term text @:term:`U`.\n"
    90             "\n"
    91             "    U\n"
    92             "        Term text U.\n")
     77        content = """.. SPDX-License-Identifier: CC-BY-SA-4.0
     78
     79.. Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
     80
     81Glossary
     82********
     83
     84.. glossary::
     85    :sorted:
     86
     87    T
     88        Term text @:term:`U`.
     89
     90    U
     91        Term text U.
     92"""
    9393        assert content == src.read()
  • rtemsqual/tests/test_validation.py

    rb3f5b7e r3b9b2bd  
    147147 *    documentation and/or other materials provided with the distribution.
    148148 *
    149  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"
     149 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    150150 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    151151 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     
    286286 *    documentation and/or other materials provided with the distribution.
    287287 *
    288  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"
     288 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    289289 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    290290 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Note: See TracChangeset for help on using the changeset viewer.