Hello community,

here is the log from the commit of package python-Flask-Migrate for 
openSUSE:Factory checked in at 2019-09-17 13:37:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-Flask-Migrate (Old)
 and      /work/SRC/openSUSE:Factory/.python-Flask-Migrate.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-Flask-Migrate"

Tue Sep 17 13:37:26 2019 rev:5 rq:731186 version:2.5.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-Flask-Migrate/python-Flask-Migrate.changes    
    2019-06-01 09:47:12.823371114 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-Flask-Migrate.new.7948/python-Flask-Migrate.changes
      2019-09-17 13:37:28.869842170 +0200
@@ -1,0 +2,5 @@
+Sat Sep 14 11:45:35 UTC 2019 - John Vandenberg <[email protected]>
+
+- Add pr_290.patch to fix tests to use sys.executable
+
+-------------------------------------------------------------------

New:
----
  pr_290.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-Flask-Migrate.spec ++++++
--- /var/tmp/diff_new_pack.2cY5sB/_old  2019-09-17 13:37:29.489842071 +0200
+++ /var/tmp/diff_new_pack.2cY5sB/_new  2019-09-17 13:37:29.493842070 +0200
@@ -25,6 +25,7 @@
 Group:          Development/Languages/Python
 URL:            http://github.com/miguelgrinberg/flask-migrate/
 Source:         
https://files.pythonhosted.org/packages/source/F/Flask-Migrate/Flask-Migrate-%{version}.tar.gz
+Patch0:         pr_290.patch
 BuildRequires:  %{python_module Flask >= 0.9}
 BuildRequires:  %{python_module Flask-SQLAlchemy >= 1.0}
 BuildRequires:  %{python_module Flask-Script >= 0.6}
@@ -46,6 +47,7 @@
 
 %prep
 %setup -q -n Flask-Migrate-%{version}
+%patch0 -p1
 
 %build
 %python_build

++++++ pr_290.patch ++++++
>From d324b3e12448214eecfa335e344e0cfd3420dce7 Mon Sep 17 00:00:00 2001
From: John Vandenberg <[email protected]>
Date: Sat, 14 Sep 2019 18:40:50 +0700
Subject: [PATCH] tests: Use sys.executable

Also re-order imports.

Closes https://github.com/miguelgrinberg/Flask-Migrate/issues/289
---
 tests/test_migrate.py         | 25 +++++++++++++------------
 tests/test_multidb_migrate.py | 15 ++++++++-------
 2 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/tests/test_migrate.py b/tests/test_migrate.py
index 85548d1..e802fd7 100644
--- a/tests/test_migrate.py
+++ b/tests/test_migrate.py
@@ -1,8 +1,9 @@
 import os
+import shlex
 import shutil
-import unittest
 import subprocess
-import shlex
+import sys
+import unittest
 
 
 def run_cmd(cmd):
@@ -53,11 +54,11 @@ def test_alembic_version(self):
             self.assertTrue(isinstance(v, int))
 
     def test_migrate_upgrade(self):
-        (o, e, s) = run_cmd('python app.py db init')
+        (o, e, s) = run_cmd(sys.executable + ' app.py db init')
         self.assertTrue(s == 0)
-        (o, e, s) = run_cmd('python app.py db migrate')
+        (o, e, s) = run_cmd(sys.executable + ' app.py db migrate')
         self.assertTrue(s == 0)
-        (o, e, s) = run_cmd('python app.py db upgrade')
+        (o, e, s) = run_cmd(sys.executable + ' app.py db upgrade')
         self.assertTrue(s == 0)
 
         from .app import db, User
@@ -65,11 +66,11 @@ def test_migrate_upgrade(self):
         db.session.commit()
 
     def test_custom_directory(self):
-        (o, e, s) = run_cmd('python app_custom_directory.py db init')
+        (o, e, s) = run_cmd(sys.executable + ' app_custom_directory.py db 
init')
         self.assertTrue(s == 0)
-        (o, e, s) = run_cmd('python app_custom_directory.py db migrate')
+        (o, e, s) = run_cmd(sys.executable + ' app_custom_directory.py db 
migrate')
         self.assertTrue(s == 0)
-        (o, e, s) = run_cmd('python app_custom_directory.py db upgrade')
+        (o, e, s) = run_cmd(sys.executable + ' app_custom_directory.py db 
upgrade')
         self.assertTrue(s == 0)
 
         from .app_custom_directory import db, User
@@ -77,13 +78,13 @@ def test_custom_directory(self):
         db.session.commit()
 
     def test_compare_type(self):
-        (o, e, s) = run_cmd('python app_compare_type1.py db init')
+        (o, e, s) = run_cmd(sys.executable + ' app_compare_type1.py db init')
         self.assertTrue(s == 0)
-        (o, e, s) = run_cmd('python app_compare_type1.py db migrate')
+        (o, e, s) = run_cmd(sys.executable + ' app_compare_type1.py db 
migrate')
         self.assertTrue(s == 0)
-        (o, e, s) = run_cmd('python app_compare_type1.py db upgrade')
+        (o, e, s) = run_cmd(sys.executable + ' app_compare_type1.py db 
upgrade')
         self.assertTrue(s == 0)
-        (o, e, s) = run_cmd('python app_compare_type2.py db migrate')
+        (o, e, s) = run_cmd(sys.executable + ' app_compare_type2.py db 
migrate')
         self.assertTrue(s == 0)
         self.assertTrue(b'Detected type change from VARCHAR(length=128) '
                         b'to String(length=10)' in e)
diff --git a/tests/test_multidb_migrate.py b/tests/test_multidb_migrate.py
index e94e089..b2ae7d2 100644
--- a/tests/test_multidb_migrate.py
+++ b/tests/test_multidb_migrate.py
@@ -1,9 +1,10 @@
 import os
-import shutil
-import unittest
-import subprocess
 import shlex
+import shutil
 import sqlite3
+import subprocess
+import sys
+import unittest
 
 
 def run_cmd(cmd):
@@ -39,11 +40,11 @@ def tearDown(self):
             pass
 
     def test_multidb_migrate_upgrade(self):
-        (o, e, s) = run_cmd('python app_multidb.py db init --multidb')
+        (o, e, s) = run_cmd(sys.executable + ' app_multidb.py db init 
--multidb')
         self.assertTrue(s == 0)
-        (o, e, s) = run_cmd('python app_multidb.py db migrate')
+        (o, e, s) = run_cmd(sys.executable + ' app_multidb.py db migrate')
         self.assertTrue(s == 0)
-        (o, e, s) = run_cmd('python app_multidb.py db upgrade')
+        (o, e, s) = run_cmd(sys.executable + ' app_multidb.py db upgrade')
         self.assertTrue(s == 0)
 
         # ensure the tables are in the correct databases
@@ -70,7 +71,7 @@ def test_multidb_migrate_upgrade(self):
         db.session.commit()
 
         # ensure the downgrade works
-        (o, e, s) = run_cmd('python app_multidb.py db downgrade')
+        (o, e, s) = run_cmd(sys.executable + ' app_multidb.py db downgrade')
         self.assertTrue(s == 0)
 
         conn1 = sqlite3.connect('app1.db')

Reply via email to