Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(26)  |  Call(24)  |  Derive(0)  |  Import(2)

src/p/y/pyroonga-0.5.2/pyroonga/tests/unit/odm/test_attributes.py   pyroonga(Download)
# -*- coding: utf-8 -*-
 
import pytest
 
from pyroonga.odm.attributes import Symbol, TableFlagsFlag
    def test___init__with_invalid_value(self):
        with pytest.raises(TypeError):
            TableFlagsFlag('flag1')
 
    @pytest.mark.parametrize('name', (
    def test___init__with_single_parameter(self, name):
        sym = Symbol(name)
        flags = TableFlagsFlag(sym)
        assert flags == [sym]
 
    def test___init__with_list(self, name1, name2):
        sym1, sym2 = (Symbol(name1), Symbol(name2))
        flags = TableFlagsFlag([sym1, sym2])
        assert flags == [sym1, sym2]
 
    def test___init__with_tuple(self, name1, name2):
        sym1, sym2 = (Symbol(name1), Symbol(name2))
        flags = TableFlagsFlag((sym1, sym2))
        assert flags == [sym1, sym2]
 

src/p/y/pyroonga-HEAD/pyroonga/tests/unit/odm/test_attributes.py   pyroonga(Download)
# -*- coding: utf-8 -*-
 
import pytest
 
from pyroonga.odm.attributes import Symbol, TableFlagsFlag
    def test___init__with_invalid_value(self):
        with pytest.raises(TypeError):
            TableFlagsFlag('flag1')
 
    @pytest.mark.parametrize('name', (
    def test___init__with_single_parameter(self, name):
        sym = Symbol(name)
        flags = TableFlagsFlag(sym)
        assert flags == [sym]
 
    def test___init__with_list(self, name1, name2):
        sym1, sym2 = (Symbol(name1), Symbol(name2))
        flags = TableFlagsFlag([sym1, sym2])
        assert flags == [sym1, sym2]
 
    def test___init__with_tuple(self, name1, name2):
        sym1, sym2 = (Symbol(name1), Symbol(name2))
        flags = TableFlagsFlag((sym1, sym2))
        assert flags == [sym1, sym2]