Ejemplo n.º 1
0
def test_limit_size():
    storage = strategy.get_empty_storage()
    d = W_DictObject(space, strategy, storage)
    for i in range(100):
        assert d.setitem_str("d%s" % i, 4) is None
    assert d.get_strategy() is not strategy
    assert "BytesDictStrategy" == d.get_strategy().__class__.__name__
Ejemplo n.º 2
0
def test_limit_size():
    storage = strategy.get_empty_storage()
    d = W_DictObject(space, strategy, storage)
    for i in range(100):
        assert d.setitem_str("d%s" % i, 4) is None
    assert d.get_strategy() is not strategy
    assert "BytesDictStrategy" == d.get_strategy().__class__.__name__
Ejemplo n.º 3
0
def test_from_empty_to_kwargs():
    strategy = EmptyKwargsDictStrategy(space)
    storage = strategy.get_empty_storage()
    d = W_DictObject(space, strategy, storage)
    d.setitem_str("a", 3)
    assert isinstance(d.get_strategy(), KwargsDictStrategy)
Ejemplo n.º 4
0
def test_from_empty_to_kwargs():
    strategy = EmptyKwargsDictStrategy(space)
    storage = strategy.get_empty_storage()
    d = W_DictObject(space, strategy, storage)
    d.setitem_str("a", 3)
    assert isinstance(d.get_strategy(), KwargsDictStrategy)