Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3 compatibility fixes #65

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5caae66
Use print(), as a function, for Python 3 compatibility
lelit Feb 9, 2014
52eb8df
Explicitly import the minifier module from the slimit package, for
lelit Feb 9, 2014
10840fb
Use the next() builtin, introduced by Python 2.6, for Python 3 compat…
lelit Feb 9, 2014
57a3193
Do not use ur"unicode-raw" strings, not supported by Python 3
lelit Feb 9, 2014
a61e12d
Change StringIO import for compatibility with Python 3
lelit Feb 9, 2014
85d7e8e
Alias next() as __next__(), for Python 3 compatibility
lelit Feb 9, 2014
9be727b
Always set slimit.parser.*tab to strings
moses-palmer Jul 16, 2015
91603ef
Merge branch 'fixup-ply-lextab'
moses-palmer Oct 2, 2015
bd8879a
Fixed a bug where object atributes with special
liftoff Apr 24, 2013
acff8c9
Merge branch 'fixup-special-characters'
moses-palmer Oct 2, 2015
17ee1d8
Use print(), as a function, for Python 3 compatibility
lelit Feb 9, 2014
94c134b
Explicitly import the minifier module from the slimit package, for
lelit Feb 9, 2014
3062026
Use the next() builtin, introduced by Python 2.6, for Python 3 compat…
lelit Feb 9, 2014
e833165
Do not use ur"unicode-raw" strings, not supported by Python 3
lelit Feb 9, 2014
5dbb884
Change StringIO import for compatibility with Python 3
lelit Feb 9, 2014
9f49840
Alias next() as __next__(), for Python 3 compatibility
lelit Feb 9, 2014
5339f8d
Merge branch 'fixup-python3'
moses-palmer Oct 2, 2015
5dd062c
Cleaner way to build a unittest suite using metaclasses
acatton Jan 23, 2015
8357730
Make visitor testing generic (in order to test many visitors)
acatton Jan 23, 2015
df3a6fb
Group visitor testing in one file
acatton Jan 23, 2015
dcd49db
Add representation and equality between abstract syntax trees
acatton Jan 26, 2015
32ddbb7
Bugfix: isolate the closure
acatton Jan 26, 2015
7a71fe4
Make sure parsing is stable
acatton Jan 26, 2015
6c7fb07
Fix unary and binary operators merging
acatton Jan 26, 2015
31c257f
Merge branch 'fixup-various'
moses-palmer Oct 2, 2015
93d75b5
fixed dot and bracket accessors on immediate numbers
Nov 5, 2013
37cb9dd
Merge branch 'fixup-accessors'
moses-palmer Oct 2, 2015
07f3a2d
Support octal escape sequences in string literals (fixes #70)
redapple Sep 6, 2014
bf5b4bb
Merge branch 'fixup-octal-escape-sequences'
moses-palmer Oct 2, 2015
6aa92d6
Expose the tracking option through the Parser
Aug 27, 2014
8f9a39c
Update lineno at the end of lines and block comments
Aug 27, 2014
08e6042
Track lineno and lexpos through nodes in the AST
Aug 27, 2014
f3df9b7
Merge branch 'fixup-tracking'
moses-palmer Oct 2, 2015
9482add
Merge moses-palmer/master, manually fixing conflict in src/slimit/tes…
lelit Feb 10, 2016
cd76bde
Recompile lextab and yacctab with PLY 3.8
lelit Feb 16, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make sure parsing is stable
  • Loading branch information
acatton authored and moses-palmer committed Oct 2, 2015
commit 7a71fe459bc4c247e69a390d725a7279130cce50
13 changes: 13 additions & 0 deletions src/slimit/tests/test_visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,19 @@ def case(self, case):
self.assertMultiLineEqual(result, expected)


class ParsingTestCase(VisitorTestMixin, unittest.TestCase):
__metaclass__ = VisitorTestMeta

def case(self, case):
parser_a = Parser()
result_a = parser_a.parse(case)

parser_b = Parser()
result_b = parser_b.parse(case)

self.assertEqual(result_a, result_b)


class MinifierTestCase(unittest.TestCase):
__metaclass__ = VisitorTestMeta

Expand Down