Пример #1
0
def test_annotation_transformation():
	ext = AnnotationExtension()
	ctx = Context()
	
	result = ext.transform(ctx, endpoint, 1134)
	
	assert result == ('int', 1134)
Пример #2
0
def test_annotation_transformation():
    ext = AnnotationExtension()
    ctx = Context()

    result = ext.transform(ctx, endpoint, 1134)

    assert result == ('int', 1134)
Пример #3
0
def test_annotation_bare():
	ext = AnnotationExtension()
	ctx = Context()
	args = []
	kwargs = {'a': '27', 'b': '42'}
	
	ext.mutate(ctx, bare_endpoint, args, kwargs)
	
	assert kwargs == {'a': '27', 'b': '42'}
	
	assert ext.transform(ctx, bare_endpoint, None) is None
Пример #4
0
def test_annotation_bare():
    ext = AnnotationExtension()
    ctx = Context()
    args = []
    kwargs = {'a': '27', 'b': '42'}

    ext.mutate(ctx, bare_endpoint, args, kwargs)

    assert kwargs == {'a': '27', 'b': '42'}

    assert ext.transform(ctx, bare_endpoint, None) is None