Ejemplo n.º 1
0
def test_setting_getting_tags_on_metadata(taggable):

    slash.tag('tagname')(taggable)

    with slash.Session() as s:  # pylint: disable=unused-variable
        tests = Loader().get_runnables(taggable)
    assert tests
    for t in tests:
        assert 'tagname' in t.__slash__.tags
Ejemplo n.º 2
0
def test_setting_getting_tags_on_metadata(taggable):

    slash.tag('tagname')(taggable)

    with slash.Session() as s:
        tests = Loader().get_runnables(taggable)
    assert tests
    for t in tests:
        assert 'tagname' in t.__slash__.tags
Ejemplo n.º 3
0
def test_tagging_twice_allowed_no_value():
    @slash.tag('something')
    def test_something():
        pass

    tagger = slash.tag('something')
    tagger(test_something)
Ejemplo n.º 4
0
def test_tagging_twice_allowed_same_values():
    @slash.tag('something', 1)
    def test_something():
        pass

    tagger = slash.tag('something', 1)
    tagger(test_something)
Ejemplo n.º 5
0
    def __code__():
        import slash

        @slash.parametrize('x', [
            500 // slash.param(tags=["regression", "ultra"]),
            50 // slash.param(tags="regression"),
            5 // slash.param(tags="sanity"),
        ])
        @slash.parametrize('y', [
            '100' // slash.tag("regression", "long"),
            '10' // slash.tag("regression", "short"),
            '1' // slash.tag("sanity"),
        ])
        @slash.parametrize('z', [True, False])
        def test_1(x, y, z):
            slash.context.result.data['params'] = (x, y, z)
Ejemplo n.º 6
0
def test_tagging_twice_forbidden_different_values():
    @slash.tag('something', 1)
    def test_something():
        pass

    tagger = slash.tag('something', 2)
    with pytest.raises(TaggingConflict):
        tagger(test_something)
Ejemplo n.º 7
0
class Tags(slash.Test):
    smoke = slash.tag('smoke')

    # tagging by simple decorator
    @slash.tag('simple')
    @smoke
    def test_tag_simple(self):
        assert 1 == 0

    # tag has value
    @slash.tag('tagname', 'tagvalue')
    @smoke
    def test_tag_has_value(self):
        assert 1 == 0

    # @tags.slash.tests.tag_storage.earlier_created_tag
    def test_earlier_created_tag(self):
        assert 1 == 0
Ejemplo n.º 8
0
class Tags(slash.Test):
    method = slash.tag("tags_speed_slash_method")

    @method
    def test_tag_simple(self):
        assert 1 == 0

    @method
    def test_tag_simple1(self):
        assert 1 == 0

    @method
    def test_tag_simple2(self):
        assert 1 == 0

    @method
    def test_tag_simple3(self):
        assert 1 == 0

    @method
    def test_tag_simple4(self):
        assert 1 == 0

    @method
    def test_tag_simple5(self):
        assert 1 == 0

    @method
    def test_tag_simple6(self):
        assert 1 == 0

    @method
    def test_tag_simple7(self):
        assert 1 == 0

    @method
    def test_tag_simple8(self):
        assert 1 == 0

    @method
    def test_tag_simple9(self):
        assert 1 == 0
Ejemplo n.º 9
0
def test_setting_getting_tags(taggable):

    slash.tag('tagname')(taggable)

    assert 'tagname' in get_tags(taggable)
    assert 'other_tags' not in get_tags(taggable)
Ejemplo n.º 10
0
def test_setting_getting_tags(taggable):

    slash.tag('tagname')(taggable)

    assert 'tagname' in get_tags(taggable)
    assert 'other_tags' not in get_tags(taggable)
Ejemplo n.º 11
0
 def wrap(f):
     import slash
     for platform in platforms:
         f = slash.tag(platform)(f)
     return f
Ejemplo n.º 12
0
import slash

# tag created earlier
earlier_created_tag = slash.tag('earlier created tag')