~mcfletch/simpleparse/pure-python

« back to all changes in this revision

Viewing changes to tests/genericvalues.py

  • Committer: Mike C. Fletcher
  • Date: 2011-09-06 20:51:03 UTC
  • Revision ID: mcfletch@vrplumber.com-20110906205103-h4h8jxu79yyed48c
Make simpleparse-pure test suite pass with no errors or warnings on Python 2.6, 2.7 and 3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
            return 0
14
14
        else:
15
15
            return -1
 
16
    
 
17
    def __eq__( self, other ):
 
18
        if other in ([], None ):
 
19
            return True 
 
20
        return False
16
21
    def __repr__( self ):
17
22
        return "<Null Children>"
18
23
NullResult = _NullResults()
22
27
            return 0
23
28
        else:
24
29
            return -1
 
30
    def __eq__( self, other ):
 
31
        if isinstance( other, (int,long) ):
 
32
            return True 
 
33
        return False
25
34
    def __repr__( self ):
26
35
        return "<Any Integer>"
27
36
AnyInt = _AnyInt()