14
0
forked from pool/python-pony

Accepting request 639546 from home:alarrosa:branches:devel:languages:python:flask

New package python-pony

OBS-URL: https://build.opensuse.org/request/show/639546
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pony?expand=0&rev=1
This commit is contained in:
2018-10-04 07:43:58 +00:00
committed by Git OBS Bridge
commit 09b043d084
7 changed files with 315 additions and 0 deletions

38
fix-tests.patch Normal file
View File

@@ -0,0 +1,38 @@
Index: pony-0.7.6/pony/orm/tests/test_show.py
===================================================================
--- pony-0.7.6.orig/pony/orm/tests/test_show.py
+++ pony-0.7.6/pony/orm/tests/test_show.py
@@ -53,7 +53,10 @@ class TestShow(unittest.TestCase):
def test_1(self):
Student.select().show()
- self.assertEqual('\n'+sys.stdout.getvalue().replace(' ', '~'), '''
+ txt = sys.stdout.getvalue().replace(' ', '~')
+ txt = txt[txt.index('id|'):]
+
+ self.assertEqual('\n'+txt, '''
id|name|scholarship|gpa|dob~~~~~~~|group~~~
--+----+-----------+---+----------+--------
1~|S1~~|None~~~~~~~|3.1|None~~~~~~|Group[1]
@@ -63,7 +66,9 @@ id|name|scholarship|gpa|dob~~~~~~~|group
def test_2(self):
Group.select().show()
- self.assertEqual('\n'+sys.stdout.getvalue().replace(' ', '~'), '''
+ txt = sys.stdout.getvalue().replace(' ', '~')
+ txt = txt[txt.index('number\n'):]
+ self.assertEqual('\n'+txt, '''
number
------
1~~~~~
Index: pony-0.7.6/pony/orm/tests/__init__.py
===================================================================
--- pony-0.7.6.orig/pony/orm/tests/__init__.py
+++ pony-0.7.6/pony/orm/tests/__init__.py
@@ -1,4 +1,4 @@
import pony.orm.core, pony.options
pony.options.CUT_TRACEBACK = False
-pony.orm.core.sql_debug(False)
\ No newline at end of file
+pony.orm.core.sql_debug(True)