#NEWLINE# def test_compile_lazy( monkeypatch ) : #NEWLINE# #INDENT# compiler = compilers . BaseCompiler ( ) #NEWLINE# monkeypatch . setattr ( compiler , 'compile' , pretend . call_recorder ( ( lambda path : path ) ) ) #NEWLINE# lazy_compiled = compiler . compile_lazy ( 'dummy.coffee' ) #NEWLINE# assert ( compiler . compile . calls == [ ] ) #NEWLINE# assert ( encoding . force_text ( lazy_compiled ) == 'dummy.coffee' ) #NEWLINE# assert ( compiler . compile . calls == [ pretend . call ( 'dummy.coffee' ) ] ) #NEWLINE# assert ( compiler . compile ( encoding . force_text ( 'foo' ) ) . startswith ( encoding . force_text ( '' ) ) is True ) #NEWLINE# assert ( compiler . compile ( encoding . force_bytes ( 'foo' ) ) . startswith ( encoding . force_bytes ( '' ) ) is True )