Exemplo n.º 1
0
     ('Alpha', ['test_one', 'test_two', 'test_three']),
     ('Beta', ['test_one', 'test_two', 'test_three']),
 ]), ('YYY', (('Gamma', ['test_one', 'test_two', 'test_three']), ))]),
 # Case 2
 (filtering.Pattern('*:*:test_two'), [('XXX', [
     ('Alpha', ['test_two']),
     ('Beta', ['test_two']),
 ]), ('YYY', [
     ('Gamma', ['test_two']),
 ])]),
 # Case 3
 (filtering.Pattern('XXX:Beta:test_two'), [
     ('XXX', [('Beta', ['test_two'])]),
 ]),
 # Case 4 - testcase name match AND tag match
 (filtering.And(filtering.Pattern('*:*:test_two'),
                filtering.Tags({'color': 'blue'})), [('XXX', [
                    ('Alpha', ['test_two']),
                ]), ('YYY', [
                    ('Gamma', ['test_two']),
                ])]),
 # Case 5 - testcase name match AND tag match, different syntax
 ((filtering.Pattern('*:*:test_two')
   and filtering.Tags({'color': 'blue'})), [('XXX', [
       ('Alpha', ['test_two']),
   ]), ('YYY', [
       ('Gamma', ['test_two']),
   ])]),
 #  Case 6 - Run tests that are:
 # named `test_one` AND tagged with `baz`
 # OR
 # belong to a suite named Alpha OR Beta AND tagged with `color`: `red`
Exemplo n.º 2
0
 def test_and(self):
     filter_1 = AlphaFilter() & BetaFilter()
     filter_2 = filtering.And(AlphaFilter(), BetaFilter())
     assert filter_1 == filter_2
Exemplo n.º 3
0
 (
     filtering.Pattern("*:*:test_two"),
     [
         ("XXX", [("Alpha", ["test_two"]), ("Beta", ["test_two"])]),
         ("YYY", [("Gamma", ["test_two"])]),
     ],
 ),
 # Case 3
 (
     filtering.Pattern("XXX:Beta:test_two"),
     [("XXX", [("Beta", ["test_two"])])],
 ),
 # Case 4 - testcase name match AND tag match
 (
     filtering.And(
         filtering.Pattern("*:*:test_two"),
         filtering.Tags({"color": "blue"}),
     ),
     [
         ("XXX", [("Alpha", ["test_two"])]),
         ("YYY", [("Gamma", ["test_two"])]),
     ],
 ),
 # Case 5 - testcase name match AND tag match, different syntax
 (
     (
         filtering.Pattern("*:*:test_two")
         and filtering.Tags({"color": "blue"})
     ),
     [
         ("XXX", [("Alpha", ["test_two"])]),
         ("YYY", [("Gamma", ["test_two"])]),