<s> import unittest <EOL> from rdflib . graph import ConjunctiveGraph as Graph <EOL> from rdfextras . sparql import algebra <EOL> from StringIO import StringIO <EOL> import rdflib <EOL> class TestSparqlASK ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . graph = Graph ( ) <EOL> io = StringIO ( """<STR_LIT>""" ) <EOL> self . graph . load ( io , format = '<STR_LIT>' ) <EOL> self . compliance_setting , algebra . DAWG_DATASET_COMPLIANCE = algebra . DAWG_DATASET_COMPLIANCE , False <EOL> def tearDown ( self ) : <EOL> algebra . DAWG_DATASET_COMPLIANCE = self . compliance_setting <EOL> def test_ask_true ( self ) : <EOL> """<STR_LIT>""" <EOL> res = self . graph . query ( '<STR_LIT>' ) <EOL> self . assertEquals ( res . askAnswer , True , "<STR_LIT>" ) <EOL> def test_ask_false ( self ) : <EOL> """<STR_LIT>""" <EOL> res = self . graph . query ( '<STR_LIT>' ) <EOL> self . assertEquals ( res . askAnswer , False , "<STR_LIT>" ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
