1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
Description: fix tests
Fix arpeggio tests
Author: Philipp Huebner <debalance@debian.org>
Index: arpeggio/arpeggio/tests/test_examples.py
===================================================================
--- arpeggio.orig/arpeggio/tests/test_examples.py
+++ arpeggio/arpeggio/tests/test_examples.py
@@ -21,7 +21,7 @@ else:
def test_examples():
examples_folder = os.path.join(os.path.abspath(os.path.dirname(__file__)),
- '..', '..', 'examples')
+ '..', '..', '..', '..', '..', 'examples')
if not os.path.exists(examples_folder):
print('Warning: Examples not found. Skipping tests.')
return
Index: arpeggio/arpeggio/tests/regressions/issue_22/test_issue_22.py
===================================================================
--- arpeggio.orig/arpeggio/tests/regressions/issue_22/test_issue_22.py
+++ arpeggio/arpeggio/tests/regressions/issue_22/test_issue_22.py
@@ -9,11 +9,11 @@ def test_issue_22():
"""
current_dir = os.path.dirname(__file__)
- grammar1 = open(os.path.join(current_dir, 'grammar1.peg')).read()
+ grammar1 = open(os.path.join(current_dir, '..', '..', '..', '..', '..', '..', '..', 'arpeggio/tests/regressions/issue_22/grammar1.peg')).read()
parser1 = ParserPEG(grammar1, 'belang')
parser1.parse('a [0]')
parser1.parse('a (0)')
- grammar2 = open(os.path.join(current_dir, 'grammar2.peg')).read()
+ grammar2 = open(os.path.join(current_dir, '..', '..', '..', '..', '..', '..', '..', 'arpeggio/tests/regressions/issue_22/grammar2.peg')).read()
parser2 = ParserPEG(grammar2, 'belang', debug=True)
parser2.parse('a [0](1)[2]')
|