def test_select_distinct(self): """Test the DISTINCT directive""" select = DBSelect('a') select.distinct() self.assertEqual( re.sub(r'\s+', ' ', str(select)), 'SELECT DISTINCT "a".* FROM "a"' ) select.distinct(False) self.assertEqual( re.sub(r'\s+', ' ', str(select)), 'SELECT "a".* FROM "a"' )