<s> from raco . backends . sparql import SPARQLAlgebra <EOL> from raco . platform_tests import MyriaLPlatformTestHarness <EOL> import raco . compile <EOL> class SPARQLTests ( object ) : <EOL> def check_sub_tables ( self , query , name , ** kwargs ) : <EOL> self . check ( query % self . tables , name , ** kwargs ) <EOL> def test_scan ( self ) : <EOL> self . check_sub_tables ( """<STR_LIT>""" , "<STR_LIT>" ) <EOL> def test_select ( self ) : <EOL> self . check_sub_tables ( """<STR_LIT>""" , "<STR_LIT>" ) <EOL> def test_join ( self ) : <EOL> self . check_sub_tables ( """<STR_LIT>""" , "<STR_LIT>" ) <EOL> class SPARQLMyriaLTests ( MyriaLPlatformTestHarness , SPARQLTests ) : <EOL> def check ( self , query , name ) : <EOL> plan = self . get_physical_plan ( query , target_alg = SPARQLAlgebra ( ) ) <EOL> sparql = raco . compile . compile ( plan ) <EOL> assert isinstance ( sparql , '<STR_LIT>' . __class__ ) <EOL> assert sparql != '<STR_LIT>' </s>
