15
0
forked from pool/python-phply
Files
python-phply/remove-nose.patch
2021-09-27 04:28:29 +00:00

70 lines
2.5 KiB
Diff

Index: phply-1.2.5/tests/test_filtered_lexer.py
===================================================================
--- phply-1.2.5.orig/tests/test_filtered_lexer.py
+++ phply-1.2.5/tests/test_filtered_lexer.py
@@ -2,7 +2,6 @@ from __future__ import print_function
from phply import phplex
-import nose.tools
import pprint
def eq_tokens(input, expected, ignore=('WHITESPACE', 'OPEN_TAG', 'CLOSE_TAG')):
@@ -23,7 +22,7 @@ def eq_tokens(input, expected, ignore=('
print('Token by token:')
for out, exp in zip(output, expected):
print('\tgot:', out, '\texpected:', exp)
- nose.tools.eq_(out, exp)
+ assert out == exp
assert len(output) == len(expected), \
'output length was %d, expected %s' % (len(output), len(expected))
Index: phply-1.2.5/tests/test_lexer.py
===================================================================
--- phply-1.2.5.orig/tests/test_lexer.py
+++ phply-1.2.5/tests/test_lexer.py
@@ -2,7 +2,6 @@ from __future__ import print_function
from phply import phplex
-import nose.tools
import pprint
def eq_tokens(input, expected, ignore=('WHITESPACE', 'OPEN_TAG', 'CLOSE_TAG')):
@@ -23,7 +22,7 @@ def eq_tokens(input, expected, ignore=('
print('Token by token:')
for out, exp in zip(output, expected):
print('\tgot:', out, '\texpected:', exp)
- nose.tools.eq_(out, exp)
+ assert out == exp
assert len(output) == len(expected), \
'output length was %d, expected %s' % (len(output), len(expected))
Index: phply-1.2.5/tests/test_parser.py
===================================================================
--- phply-1.2.5.orig/tests/test_parser.py
+++ phply-1.2.5/tests/test_parser.py
@@ -4,7 +4,6 @@ from phply import phplex
from phply.phpparse import make_parser
from phply.phpast import *
-import nose.tools
import pprint
import sys
@@ -23,12 +22,12 @@ def eq_ast(input, expected, filename=Non
print('Node by node:')
for out, exp in zip(output, expected):
print('\tgot:', out, '\texpected:', exp)
- nose.tools.eq_(out, exp)
+ assert out == exp
# compare line numbers, but only for top elements
if with_top_lineno:
print('\tgot line:', out.lineno, '\texpected:', exp.lineno)
- nose.tools.eq_(out.lineno, exp.lineno)
+ assert out.lineno == exp.lineno
assert len(output) == len(expected), \
'output length was %d, expected %s' % (len(output), len(expected))