Esempio n. 1
0
def test_annotation_transformation():
	ext = AnnotationExtension()
	ctx = Context()
	
	result = ext.transform(ctx, endpoint, 1134)
	
	assert result == ('int', 1134)
Esempio n. 2
0
def test_annotation_transformation():
    ext = AnnotationExtension()
    ctx = Context()

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

    assert result == ('int', 1134)
Esempio n. 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
Esempio n. 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