15
0
forked from pool/python-phply

Accepting request 1073577 from devel:languages:python

- update to 1.2.6:
  * move away from nose to pytest
- drop remove-nose.patch (upstream)

OBS-URL: https://build.opensuse.org/request/show/1073577
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-phply?expand=0&rev=5
This commit is contained in:
2023-03-24 14:16:01 +00:00
committed by Git OBS Bridge
5 changed files with 13 additions and 77 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7d45875288fbd8d6c80231e3195dea4487bc1a9b67f2681e5fe9907b81249f3f
size 71144

3
phply-1.2.6.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0b27774d285f507a3445805a05f8fb2998f56d709270f78b89208b65b0d84917
size 73083

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Mar 21 15:24:57 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 1.2.6:
* move away from nose to pytest
- drop remove-nose.patch (upstream)
-------------------------------------------------------------------
Mon Sep 27 04:27:24 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-phply
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,14 +18,13 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-phply
Version: 1.2.5
Version: 1.2.6
Release: 0
Summary: Lexer and parser for PHP source implemented using PLY
License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/viraptor/phply
Source: https://files.pythonhosted.org/packages/source/p/phply/phply-%{version}.tar.gz
Patch0: remove-nose.patch
BuildRequires: %{python_module ply}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
@@ -41,8 +40,7 @@ BuildArch: noarch
phply is a parser for the PHP programming language written using PLY, a Lex/YACC-style parser generator toolkit for Python.
%prep
%setup -q -n phply-%{version}
%autopatch -p1
%autosetup -p1 -n phply-%{version}
%build
%python_build

View File

@@ -1,69 +0,0 @@
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))