~mwhudson/pypy/imported-dist-future-fixing

« back to all changes in this revision

Viewing changes to pypy/interpreter/pyparser/test/test_parser.py

  • Committer: ac
  • Date: 2007-11-20 20:03:48 UTC
  • Revision ID: svn-v4:fd0d7bf2-dfb6-0310-8d31-b7ecfe96aada:pypy/branch/dist-future-fixing:48879
(jacob, arre): More work on making from __future__ support more sane.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
def test_symbols():
8
8
    p = Parser()
9
9
    x1 = p.add_symbol('sym')
10
 
    x2 = p.add_token(Token(p, 'tok'))
 
10
    x2 = p.add_token(Token('tok'))
11
11
    x3 = p.add_anon_symbol(':sym')
12
12
    x4 = p.add_anon_symbol(':sym1')
13
13
    # test basic numbering assumption
20
20
    assert x3 < 0
21
21
    y1 = p.add_symbol('sym')
22
22
    assert y1 == x1
23
 
    y2 = p.add_token(Token(p, 'tok'))
 
23
    y2 = p.add_token(Token('tok'))
24
24
    assert y2 == x2
25
25
    y3 = p.add_symbol(':sym')
26
26
    assert y3 == x3
50
50
 
51
51
    def __init__(self, *args, **kw):
52
52
        self.trace = []
53
 
        self.exclude_rules = [
54
 
            'dotted_name', 'dotted_as_name', 'dotted_as_names',
55
 
            'import_stmt', 'small_stmt', 'simple_stmt', 'stmt',
56
 
            'single_input', 'file_input', 'future_import_list',
57
 
            'import_from_future', 'future_import_as_names']
 
53
        self.exclude_rules = []
58
54
 
59
55
    def __getitem__(self, attr):
60
56
        if attr in self.exclude_rules:
76
72
        self.build_rules = RuleTracer()
77
73
 
78
74
 
79
 
class TestFuture(object):
 
75
class XTestFuture(object):
80
76
 
81
77
    _grammar_ver = '2.5a'
82
78