Skip to content

Commit

Permalink
change test parameterization layout
Browse files Browse the repository at this point in the history
  • Loading branch information
HerrMuellerluedenscheid committed Nov 7, 2021
1 parent 6dff3d8 commit 8de56bd
Showing 1 changed file with 74 additions and 179 deletions.
253 changes: 74 additions & 179 deletions tests/test_class_oelint_file_inappmsg.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,189 +6,84 @@ class TestClassOelintFileUpstreamStatusInAppMsg(TestBaseClass):

@pytest.mark.parametrize('id', ['oelint.file.inappropriatemsg'])
@pytest.mark.parametrize('occurrence', [1])
@pytest.mark.parametrize('input',
[
{
'oelint_adv-test.bb':
'''
SRC_URI = "file://test.patch"
''',
'files/test.patch':
'''
Upstream-Status: Inappropriate [me don't care]
''',
},
{
'oelint_adv-test.bb':
'''
SRC_URI = "file://test.patch"
''',
'files/test.patch':
'''
Upstream-Status: Inappropriate
''',
},
{
'oelint_adv-test.bb':
'''
SRC_URI = "file://test.patch"
''',
'files/test.patch':
'''
Upstream-Status: Inappropriate (configuration)
''',
},
],
)
@pytest.mark.parametrize('input', [
{
'oelint_adv-test.bb': 'SRC_URI = "file://test.patch"',
'files/test.patch': 'Upstream-Status: Inappropriate [me don\'t care]',
},
{
'oelint_adv-test.bb': 'SRC_URI = "file://test.patch"',
'files/test.patch': ' Upstream-Status: Inappropriate',
},
{
'oelint_adv-test.bb': 'SRC_URI = "file://test.patch"',
'files/test.patch': 'Upstream-Status: Inappropriate (configuration)',
},
],
)
def test_bad(self, input, id, occurrence):
self.check_for_id(self._create_args(input), id, occurrence)

@pytest.mark.parametrize('id', ['oelint.file.inappropriatemsg'])
@pytest.mark.parametrize('occurrence', [0])
@pytest.mark.parametrize('input',
[
{
'oelint_adv-test.bb':
'''
SRC_URI = "file://test.patch"
''',
'files/test.patch':
'''
Upstream-Status: Inappropriate [oe-specific]
''',
},
{
'oelint_adv-test.bb':
'''
SRC_URI = "file://test.patch"
''',
'files/test.patch':
'''
Upstream-Status: Inappropriate [OE specific]
''',
},
{
'oelint_adv-test.bb':
'''
SRC_URI = "file://test.patch"
''',
'files/test.patch':
'''
Upstream-Status: Inappropriate [oe-core specific]
''',
},
{
'oelint_adv-test.bb':
'''
SRC_URI = "file://test.patch"
''',
'files/test.patch':
'''
Upstream-Status: Inappropriate [not author]
''',
},
{
'oelint_adv-test.bb':
'''
SRC_URI = "file://test.patch"
''',
'files/test.patch':
'''
Upstream-Status: Inappropriate [native]
''',
},
{
'oelint_adv-test.bb':
'''
SRC_URI = "file://test.patch"
''',
'files/test.patch':
'''
Upstream-Status: Inappropriate [licensing]
''',
},
{
'oelint_adv-test.bb':
'''
SRC_URI = "file://test.patch"
''',
'files/test.patch':
'''
Upstream-Status: Inappropriate [configuration]
''',
},
{
'oelint_adv-test.bb':
'''
SRC_URI = "file://test.patch"
''',
'files/test.patch':
'''
Upstream-Status: Inappropriate [enable feature]
''',
},
{
'oelint_adv-test.bb':
'''
SRC_URI = "file://test.patch"
''',
'files/test.patch':
'''
Upstream-Status: Inappropriate [disable feature]
''',
},
{
'oelint_adv-test.bb':
'''
SRC_URI = "file://test.patch"
''',
'files/test.patch':
'''
Upstream-Status: Inappropriate [bugfix this and that]
''',
},
{
'oelint_adv-test.bb':
'''
SRC_URI = "file://test.patch"
''',
'files/test.patch':
'''
Upstream-Status: Inappropriate [bugfix #12345]
''',
},
{
'oelint_adv-test.bb':
'''
SRC_URI = "file://test.patch"
''',
'files/test.patch':
'''
Upstream-Status: Inappropriate [embedded specific]
''',
},
{
'oelint_adv-test.bb':
'''
SRC_URI = "file://test.patch"
''',
'files/test.patch':
'''
Upstream-Status: Inappropriate [no upstream]
''',
},
{
'oelint_adv-test.bb':
'''
SRC_URI = "file://test.patch"
''',
'files/test.patch':
'''
Upstream-Status: Inappropriate [other]
''',
},
],
)
@pytest.mark.parametrize('input', [
{
'oelint_adv-test.bb': 'SRC_URI = "file://test.patch"',
'files/test.patch': 'Upstream-Status: Inappropriate [oe-specific]',
},
{
'oelint_adv-test.bb': 'SRC_URI = "file://test.patch"',
'files/test.patch': 'Upstream-Status: Inappropriate [OE specific]',
},
{
'oelint_adv-test.bb': 'SRC_URI = "file://test.patch"',
'files/test.patch': 'Upstream-Status: Inappropriate [oe-core specific]',
},
{
'oelint_adv-test.bb': 'SRC_URI = "file://test.patch"',
'files/test.patch': 'Upstream-Status: Inappropriate [not author]',
},
{
'oelint_adv-test.bb': 'SRC_URI = "file://test.patch"',
'files/test.patch': 'Upstream-Status: Inappropriate [native]',
},
{
'oelint_adv-test.bb': 'SRC_URI = "file://test.patch"',
'files/test.patch': 'Upstream-Status: Inappropriate [licensing]',
},
{
'oelint_adv-test.bb': 'SRC_URI = "file://test.patch"',
'files/test.patch': 'Upstream-Status: Inappropriate [configuration]',
},
{
'oelint_adv-test.bb': 'SRC_URI = "file://test.patch"',
'files/test.patch': 'Upstream-Status: Inappropriate [enable feature]',
},
{
'oelint_adv-test.bb': 'SRC_URI = "file://test.patch"',
'files/test.patch': 'Upstream-Status: Inappropriate [disable feature]',
},
{
'oelint_adv-test.bb': 'SRC_URI = "file://test.patch"',
'files/test.patch': 'Upstream-Status: Inappropriate [bugfix this and that]',
},
{
'oelint_adv-test.bb': 'SRC_URI = "file://test.patch"',
'files/test.patch': 'Upstream-Status: Inappropriate [bugfix #12345]',
},
{
'oelint_adv-test.bb': 'SRC_URI = "file://test.patch"',
'files/test.patch': 'Upstream-Status: Inappropriate [embedded specific]',
},
{
'oelint_adv-test.bb': 'SRC_URI = "file://test.patch"',
'files/test.patch': 'Upstream-Status: Inappropriate [no upstream]',
},
{
'oelint_adv-test.bb': 'SRC_URI = "file://test.patch"',
'files/test.patch': 'Upstream-Status: Inappropriate [other]',
},
],
)
def test_good(self, input, id, occurrence):
self.check_for_id(self._create_args(input), id, occurrence)

0 comments on commit 8de56bd

Please sign in to comment.