~jkakar/storm/fluidinfo-trunk

« back to all changes in this revision

Viewing changes to tests/expr.py

  • Committer: Jamu Kakar
  • Date: 2011-08-16 10:12:36 UTC
  • mfrom: (386.2.11 storm)
  • Revision ID: jkakar@kakar.ca-20110816101236-13jg7h1ys8s974n4
- Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
657
657
                          'SELECT DISTINCT column1, column2 FROM "table 1"')
658
658
        self.assertEquals(state.parameters, [])
659
659
 
 
660
    def test_select_distinct_on(self):
 
661
        expr = Select([column1, column2], Undef, [table1],
 
662
                      distinct=[column2, column1])
 
663
        state = State()
 
664
        statement = compile(expr, state)
 
665
        self.assertEquals(statement,
 
666
                          'SELECT DISTINCT ON (column2, column1) '
 
667
                          'column1, column2 FROM "table 1"')
 
668
        self.assertEquals(state.parameters, [])
 
669
 
660
670
    def test_select_where(self):
661
671
        expr = Select([column1, Func1()],
662
672
                      Func1(),