Hello community,

here is the log from the commit of package obs-service-tar_scm for 
openSUSE:Factory checked in at 2017-06-27 10:21:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-service-tar_scm (Old)
 and      /work/SRC/openSUSE:Factory/.obs-service-tar_scm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "obs-service-tar_scm"

Tue Jun 27 10:21:29 2017 rev:43 rq:506248 version:0.7.0.1497870887.fa1750b

Changes:
--------
--- /work/SRC/openSUSE:Factory/obs-service-tar_scm/obs-service-tar_scm.changes  
2017-06-16 10:54:17.731619562 +0200
+++ 
/work/SRC/openSUSE:Factory/.obs-service-tar_scm.new/obs-service-tar_scm.changes 
    2017-06-27 10:21:44.423225941 +0200
@@ -1,0 +2,6 @@
+Mon Jun 19 11:16:11 UTC 2017 - [email protected]
+
+- Update to version 0.7.0.1497261741.b1aa4cb:
+  * Move spec file to git
+
+-------------------------------------------------------------------
@@ -6,6 +11,0 @@
-  * [lint] improve inline doc in TarSCM/tasks.py
-  * [lint] refactor attribute dataMap in TarSCM.tasks
-  * [lint] refactor invalid variable names in TarSCM.tasks
-  * [lint] remove variable helpers from TarSCM.tasks
-  * [lint] rename variable changes -> detected_changes in TarSCM.tasks
-  * [lint] fixed 'line-to-long' error in TarSCM.tasks

Old:
----
  obs-service-tar_scm-0.7.0.1496831936.d960322.tar.gz

New:
----
  obs-service-tar_scm-0.7.0.1497870887.fa1750b.tar.gz

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

Other differences:
------------------
++++++ obs-service-tar_scm.spec ++++++
--- /var/tmp/diff_new_pack.VX43Sb/_old  2017-06-27 10:21:45.323098757 +0200
+++ /var/tmp/diff_new_pack.VX43Sb/_new  2017-06-27 10:21:45.327098192 +0200
@@ -19,8 +19,8 @@
 %bcond_without obs_scm_testsuite
 
 Name:           obs-service-tar_scm
-%define version_unconverted 0.7.0.1496831936.d960322
-Version:        0.7.0.1496831936.d960322
+%define version_unconverted 0.7.0.1497870887.fa1750b
+Version:        0.7.0.1497870887.fa1750b
 Release:        0
 Summary:        An OBS source service: create tar ball from svn/git/hg
 License:        GPL-2.0+

++++++ _service ++++++
--- /var/tmp/diff_new_pack.VX43Sb/_old  2017-06-27 10:21:45.359093670 +0200
+++ /var/tmp/diff_new_pack.VX43Sb/_new  2017-06-27 10:21:45.363093104 +0200
@@ -6,6 +6,7 @@
     <param name="version">git-master</param>
     <param name="versionformat">0.7.0.%ct.%h</param>
     <param name="changesgenerate">enable</param>
+    <param name="extract">dist/obs-service-tar_scm.spec</param>
   </service>
   <service name="recompress" mode="disabled">
     <param name="file">*.tar</param>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.VX43Sb/_old  2017-06-27 10:21:45.383090278 +0200
+++ /var/tmp/diff_new_pack.VX43Sb/_new  2017-06-27 10:21:45.383090278 +0200
@@ -5,4 +5,4 @@
             <param 
name="url">git://github.com/M0ses/obs-service-tar_scm.git</param>
           <param 
name="changesrevision">b742dfc0e12755cf306a95439494b5bdde7c0c61</param></service><service
 name="tar_scm">
                 <param 
name="url">git://github.com/openSUSE/obs-service-tar_scm.git</param>
-              <param 
name="changesrevision">03230fdf240addb3dd1ba3201beef50722cc87ac</param></service></servicedata>
\ No newline at end of file
+              <param 
name="changesrevision">fa1750b7f620aee1f85304514daf712f18bb035b</param></service></servicedata>
\ No newline at end of file

++++++ obs-service-tar_scm-0.7.0.1496831936.d960322.tar.gz -> 
obs-service-tar_scm-0.7.0.1497870887.fa1750b.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/TarSCM/__init__.py 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/TarSCM/__init__.py
--- old/obs-service-tar_scm-0.7.0.1496831936.d960322/TarSCM/__init__.py 
2017-06-07 12:38:56.000000000 +0200
+++ new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/TarSCM/__init__.py 
2017-06-19 13:14:47.000000000 +0200
@@ -1,3 +1,5 @@
+from __future__ import print_function
+
 import sys
 import os
 
@@ -31,8 +33,8 @@
 
     try:
         task_list.process_list()
-    except OptionsError as e:
-        print(e)
+    except OptionsError as exc:
+        print(exc)
         sys.exit(1)
 
     task_list.finalize(_cli)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/TarSCM/tasks.py 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/TarSCM/tasks.py
--- old/obs-service-tar_scm-0.7.0.1496831936.d960322/TarSCM/tasks.py    
2017-06-07 12:38:56.000000000 +0200
+++ new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/TarSCM/tasks.py    
2017-06-19 13:14:47.000000000 +0200
@@ -104,7 +104,7 @@
         process tasks from the task_list
         '''
         for task in self.task_list:
-            self._process_single_task(task)
+            self.process_single_task(task)
 
     def finalize(self, args):
         '''
@@ -119,7 +119,7 @@
                 outfile.write(yaml.dump(self.data_map,
                                         default_flow_style=False))
 
-    def _process_single_task(self, args):
+    def process_single_task(self, args):
         '''
         do the work for a single task
         '''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/dist/obs-service-tar_scm.spec 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/dist/obs-service-tar_scm.spec
--- 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/dist/obs-service-tar_scm.spec  
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/dist/obs-service-tar_scm.spec  
    2017-06-19 13:14:47.000000000 +0200
@@ -0,0 +1,184 @@
+#
+# spec file for package obs-service-tar_scm
+#
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+#
+# All modifications and additions to the file contributed by third parties
+# remain the property of their copyright owners, unless otherwise agreed
+# upon. The license for this file, and modifications and additions to the
+# file, is the same license as for the pristine package itself (unless the
+# license for the pristine package is not an Open Source License, in which
+# case the license is the MIT License). An "Open Source License" is a
+# license that conforms to the Open Source Definition (Version 1.9)
+# published by the Open Source Initiative.
+
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
+#
+
+
+%bcond_without obs_scm_testsuite
+
+Name:           obs-service-tar_scm
+%define version_unconverted 0.7.0.1496831936.d960322
+Version:        0.7.0.1496831936.d960322
+Release:        0
+Summary:        An OBS source service: create tar ball from svn/git/hg
+License:        GPL-2.0+
+Group:          Development/Tools/Building
+Url:            https://github.com/openSUSE/obs-service-tar_scm
+Source:         %{name}-%{version}.tar.gz
+# Fix build on Ubuntu by disabling mercurial tests, not applied in rpm
+# based distributions
+#Patch0:         0001-Debianization-disable-running-mercurial-tests.patch
+%if %{with obs_scm_testsuite}
+BuildRequires:  bzr
+BuildRequires:  git-core
+BuildRequires:  mercurial
+%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
+BuildRequires:  PyYAML
+%else
+BuildRequires:  python-PyYAML
+%endif
+BuildRequires:  python-dateutil
+BuildRequires:  python-lxml
+BuildRequires:  python-mock
+BuildRequires:  subversion
+%endif
+BuildRequires:  python >= 2.6
+BuildRequires:  python-unittest2
+Requires:       bzr
+Requires:       git-core
+Requires:       mercurial
+Requires:       obs-service-obs_scm-common = %version-%release
+Requires:       subversion
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+BuildArch:      noarch
+
+%description
+This is a source service for openSUSE Build Service.
+
+It supports downloading from svn, git, hg and bzr repositories.
+
+%package -n     obs-service-obs_scm-common
+Summary:        Common parts of SCM handling services
+Group:          Development/Tools/Building
+Requires:       python-dateutil
+%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
+Requires:       PyYAML
+%else
+Requires:       python-PyYAML
+%if 0%{?suse_version} < 1315
+Requires:       python-argparse
+%endif
+%endif
+
+%if 0%{?fedora_version} >= 25
+Requires:       python2
+%endif
+
+%description -n obs-service-obs_scm-common
+
+%package -n     obs-service-tar
+Summary:        Creates a tar archive from local directory
+Group:          Development/Tools/Building
+Requires:       obs-service-obs_scm-common = %version-%release
+Provides:       obs-service-tar_scm:/usr/lib/obs/service/tar.service
+
+%description -n obs-service-tar
+Creates a tar archive from local directory
+
+%package -n     obs-service-obs_scm
+Summary:        Creates a OBS cpio from a remote SCM resource
+Group:          Development/Tools/Building
+Provides:       obs-service-tar_scm:/usr/lib/obs/service/obs_scm.service
+Requires:       bzr
+Requires:       git-core
+Requires:       mercurial
+Requires:       obs-service-obs_scm-common = %version-%release
+Requires:       subversion
+
+%description -n obs-service-obs_scm
+Creates a OBS cpio from a remote SCM resource.
+
+This can be used to work directly in local git checkout and can be packaged
+into a tar ball during build time.
+
+%package -n     obs-service-appimage
+Summary:        Handles source downloads defined in appimage.yml files
+Group:          Development/Tools/Building
+Requires:       bzr
+Requires:       git-core
+Requires:       mercurial
+Requires:       obs-service-obs_scm-common = %version-%release
+Requires:       subversion
+
+%description -n obs-service-appimage
+Experimental appimage support: This parses appimage.yml files for SCM
+resources and packages them.
+
+%package -n     obs-service-snapcraft
+Summary:        Handles source downloads defined in snapcraft.yaml files
+Group:          Development/Tools/Building
+Provides:       obs-service-tar_scm:/usr/lib/obs/service/snapcraft.service
+Requires:       bzr
+Requires:       git-core
+Requires:       mercurial
+Requires:       obs-service-obs_scm-common = %version-%release
+Requires:       subversion
+
+%description -n obs-service-snapcraft
+Experimental snapcraft support: This parses snapcraft.yaml files for SCM
+resources and packages them.
+
+
+%prep
+%setup -q -n obs-service-tar_scm-%version
+
+%build
+
+%install
+make install DESTDIR="%{buildroot}" PREFIX="%{_prefix}" SYSCFG="%{_sysconfdir}"
+
+%if %{with obs_scm_testsuite}
+%if 0%{?suse_version} >= 1220
+%check
+# No need to run PEP8 tests here; that would require a potentially
+# brittle BuildRequires: python-pep8, and any style issues are already
+# caught by Travis CI.
+make test
+%endif
+%endif
+
+%files
+%defattr(-,root,root)
+%{_prefix}/lib/obs/service/tar_scm.service
+
+%files -n obs-service-obs_scm-common
+%defattr(-,root,root)
+%dir %{_prefix}/lib/obs
+%dir %{_prefix}/lib/obs/service
+%{_prefix}/lib/obs/service/TarSCM
+%{_prefix}/lib/obs/service/tar_scm
+%dir %{_sysconfdir}/obs
+%dir %{_sysconfdir}/obs/services
+%config(noreplace) %{_sysconfdir}/obs/services/*
+
+%files -n obs-service-tar
+%defattr(-,root,root)
+%{_prefix}/lib/obs/service/tar
+%{_prefix}/lib/obs/service/tar.service
+
+%files -n obs-service-obs_scm
+%defattr(-,root,root)
+%{_prefix}/lib/obs/service/obs_scm
+%{_prefix}/lib/obs/service/obs_scm.service
+
+%files -n obs-service-appimage
+%defattr(-,root,root)
+%{_prefix}/lib/obs/service/appimage*
+
+%files -n obs-service-snapcraft
+%defattr(-,root,root)
+%{_prefix}/lib/obs/service/snapcraft*
+
+%changelog
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tar_scm.py 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tar_scm.py
--- old/obs-service-tar_scm-0.7.0.1496831936.d960322/tar_scm.py 2017-06-07 
12:38:56.000000000 +0200
+++ new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tar_scm.py 2017-06-19 
13:14:47.000000000 +0200
@@ -17,9 +17,10 @@
 
 sys.path.append(os.path.dirname(os.path.abspath(__file__)))  # noqa
 
-import TarSCM
-import TarSCM.tasks
-from TarSCM.exceptions import OptionsError
+# These two modules have to be imported after sys.path.append because
+# the additional path is where the modules are found
+import TarSCM        # pylint: disable=wrong-import-position
+import TarSCM.tasks  # pylint: disable=wrong-import-position
 
 
 def main():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/commontests.py 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/commontests.py
--- old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/commontests.py       
2017-06-07 12:38:56.000000000 +0200
+++ new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/commontests.py       
2017-06-19 13:14:47.000000000 +0200
@@ -4,9 +4,9 @@
 
 from pprint         import pprint, pformat
 
-from testassertions import TestAssertions
-from testenv        import TestEnvironment
-from utils          import mkfreshdir
+from tests.testassertions import TestAssertions
+from tests.testenv        import TestEnvironment
+from tests.utils          import mkfreshdir
 
 
 class CommonTests(TestEnvironment, TestAssertions):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/fixtures/TasksTestCases/test_generate_task_list_multi_tasks/snapcraft.yaml
 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/fixtures/TasksTestCases/test_generate_task_list_multi_tasks/snapcraft.yaml
--- 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/fixtures/TasksTestCases/test_generate_task_list_multi_tasks/snapcraft.yaml
   2017-06-07 12:38:56.000000000 +0200
+++ 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/fixtures/TasksTestCases/test_generate_task_list_multi_tasks/snapcraft.yaml
   1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-name: pipelinetest
-version: 1.0
-summary: Libpipeline example
-description: |
-  This is an example package of an autotools project built with snapcraft
-  using a remote source.
-
-apps:
-  pipelinetest:
-    command: ./bin/test
-
-parts:
-    kanku:
-        plugin: make
-        source: [email protected]:M0ses/kanku
-        source-type: git
-        after:
-            - libpipeline
-    libpipeline:
-        plugin: autotools
-        source: lp:~mterry/libpipeline/printf
-        source-type: bzr
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/fixtures/TasksTestCases/test_generate_task_list_single_task/snapcraft.yaml
 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/fixtures/TasksTestCases/test_generate_task_list_single_task/snapcraft.yaml
--- 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/fixtures/TasksTestCases/test_generate_task_list_single_task/snapcraft.yaml
   2017-06-07 12:38:56.000000000 +0200
+++ 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/fixtures/TasksTestCases/test_generate_task_list_single_task/snapcraft.yaml
   1970-01-01 01:00:00.000000000 +0100
@@ -1,28 +0,0 @@
-name: pipelinetest
-version: 1.0
-summary: Libpipeline example
-description: |
-  This is an example package of an autotools project built with snapcraft
-  using a remote source.
-
-apps:
-  pipelinetest:
-    command: ./bin/test
-
-parts:
-    pipelinetest:
-        plugin: make
-        source: .
-        after:
-            - libpipeline
-    unkown-source-type:
-        plugin: make
-        source: .
-        source-type: not-known
-        after:
-            - libpipeline
-    libpipeline:
-        plugin: autotools
-        source: lp:~mterry/libpipeline/printf
-        source-type: bzr
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/fixtures/TasksTestCases/test_generate_task_list_single_task_appimage/appimage.yml
 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/fixtures/TasksTestCases/test_generate_task_list_single_task_appimage/appimage.yml
--- 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/fixtures/TasksTestCases/test_generate_task_list_single_task_appimage/appimage.yml
    2017-06-07 12:38:56.000000000 +0200
+++ 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/fixtures/TasksTestCases/test_generate_task_list_single_task_appimage/appimage.yml
    1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-app: QtQuickApp
-
-build:
-  packages:
-    - linuxdeployqt
-    - pkgconfig(Qt5Quick)
-  git:
-    - https://github.com/probonopd/QtQuickApp.git
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/fixtures/TasksTestCases/test_generate_tl_multi_tasks/snapcraft.yaml
 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/fixtures/TasksTestCases/test_generate_tl_multi_tasks/snapcraft.yaml
--- 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/fixtures/TasksTestCases/test_generate_tl_multi_tasks/snapcraft.yaml
  1970-01-01 01:00:00.000000000 +0100
+++ 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/fixtures/TasksTestCases/test_generate_tl_multi_tasks/snapcraft.yaml
  2017-06-19 13:14:47.000000000 +0200
@@ -0,0 +1,23 @@
+name: pipelinetest
+version: 1.0
+summary: Libpipeline example
+description: |
+  This is an example package of an autotools project built with snapcraft
+  using a remote source.
+
+apps:
+  pipelinetest:
+    command: ./bin/test
+
+parts:
+    kanku:
+        plugin: make
+        source: [email protected]:M0ses/kanku
+        source-type: git
+        after:
+            - libpipeline
+    libpipeline:
+        plugin: autotools
+        source: lp:~mterry/libpipeline/printf
+        source-type: bzr
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/fixtures/TasksTestCases/test_generate_tl_single_task/snapcraft.yaml
 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/fixtures/TasksTestCases/test_generate_tl_single_task/snapcraft.yaml
--- 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/fixtures/TasksTestCases/test_generate_tl_single_task/snapcraft.yaml
  1970-01-01 01:00:00.000000000 +0100
+++ 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/fixtures/TasksTestCases/test_generate_tl_single_task/snapcraft.yaml
  2017-06-19 13:14:47.000000000 +0200
@@ -0,0 +1,28 @@
+name: pipelinetest
+version: 1.0
+summary: Libpipeline example
+description: |
+  This is an example package of an autotools project built with snapcraft
+  using a remote source.
+
+apps:
+  pipelinetest:
+    command: ./bin/test
+
+parts:
+    pipelinetest:
+        plugin: make
+        source: .
+        after:
+            - libpipeline
+    unkown-source-type:
+        plugin: make
+        source: .
+        source-type: not-known
+        after:
+            - libpipeline
+    libpipeline:
+        plugin: autotools
+        source: lp:~mterry/libpipeline/printf
+        source-type: bzr
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/fixtures/TasksTestCases/test_generate_tl_st_appimage/appimage.yml
 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/fixtures/TasksTestCases/test_generate_tl_st_appimage/appimage.yml
--- 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/fixtures/TasksTestCases/test_generate_tl_st_appimage/appimage.yml
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/fixtures/TasksTestCases/test_generate_tl_st_appimage/appimage.yml
    2017-06-19 13:14:47.000000000 +0200
@@ -0,0 +1,9 @@
+app: QtQuickApp
+
+build:
+  packages:
+    - linuxdeployqt
+    - pkgconfig(Qt5Quick)
+  git:
+    - https://github.com/probonopd/QtQuickApp.git
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/fixtures/TasksTestCases/test_tasks_finalize
 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/fixtures/TasksTestCases/test_tasks_finalize
--- 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/fixtures/TasksTestCases/test_tasks_finalize
  2017-06-27 10:21:45.503073320 +0200
+++ 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/fixtures/TasksTestCases/test_tasks_finalize
  2017-06-27 10:21:45.559065407 +0200
@@ -1 +1 @@
-symbolic link to test_generate_task_list_multi_tasks/
+symbolic link to test_generate_tl_multi_tasks/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/scmlogs.py 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/scmlogs.py
--- old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/scmlogs.py   
2017-06-07 12:38:56.000000000 +0200
+++ new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/scmlogs.py   
2017-06-19 13:14:47.000000000 +0200
@@ -1,5 +1,5 @@
 #!/usr/bin/env python2
-
+from __future__ import print_function
 import glob
 import os
 
@@ -39,9 +39,11 @@
             os.environ['PATH'] = new_path
 
     def __init__(self, scm, test_dir):
-        self.scm = scm
-        self.test_dir = test_dir
-        self.counter = 0
+        self.scm              = scm
+        self.test_dir         = test_dir
+        self.counter          = 0
+        self.current_log_path = None
+
         self.unlink_existing_logs()
 
     def get_log_file_template(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/tasks.py 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/tasks.py
--- old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/tasks.py     
2017-06-07 12:38:56.000000000 +0200
+++ new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/tasks.py     
2017-06-19 13:14:47.000000000 +0200
@@ -1,9 +1,8 @@
+from __future__ import print_function
+
 import sys
 import os
-import argparse
 import inspect
-import re
-import copy
 import shutil
 from mock import MagicMock
 
@@ -23,6 +22,7 @@
         self.tmp_dir   = os.path.join(self.tests_dir, 'tmp')
         self.outdir    = os.path.join(self.tmp_dir,
                                       self.__class__.__name__, 'out')
+        self.cur_dir   = None
         self._prepare_cli()
 
     def tearDown(self):
@@ -42,19 +42,19 @@
         fn_name = inspect.stack()[1][3]
         try:
             os.chdir(os.path.join(self.basedir, 'fixtures', cl_name, fn_name))
-        except(OSError) as e:
+        except OSError:
             print("current working directory: %s" % os.getcwd())
-            raise(e)
+            raise
 
     def _restore_cwd(self):
         try:
             os.chdir(self.basedir)
-        except(OSError) as e:
+        except OSError:
             print("failed to restore : current working directory: %s" %
                   os.getcwd())
-            raise(e)
+            raise
 
-    def test_generate_task_list_single_task(self):
+    def test_generate_tl_single_task(self):
         expected = {
             'scm': 'bzr', 'clone_prefix': '_obs_', 'snapcraft': True,
             'revision': None, 'url': 'lp:~mterry/libpipeline/printf',
@@ -64,11 +64,12 @@
         tasks = TarSCM.tasks()
         tasks.generate_list(self.cli)
         self._restore_cwd()
-        for k in expected.keys():
+        for k in expected:
             self.assertEqual(tasks.task_list[0].__dict__[k], expected[k])
         self.assertEqual(len(tasks.task_list), 1)
 
-    def test_generate_task_list_single_task_appimage(self):
+    def test_generate_tl_st_appimage(self):
+        '''Test generates task list with single task from appimage.yml'''
         self.cli.snapcraft = False
         self.cli.appimage = True
         expected = {
@@ -83,7 +84,7 @@
         tasks = TarSCM.tasks()
         tasks.generate_list(self.cli)
         self._restore_cwd()
-        for k in expected.keys():
+        for k in expected:
             self.assertEqual(tasks.task_list[0].__dict__[k], expected[k])
         self.assertEqual(len(tasks.task_list), 1)
 
@@ -94,7 +95,7 @@
         tasks = TarSCM.tasks()
         tasks.generate_list(self.cli)
 
-    def test_generate_task_list_multi_tasks(self):
+    def test_generate_tl_multi_tasks(self):
         expected = {
             'libpipeline': {
                 'changesgenerate': False,
@@ -124,9 +125,9 @@
         tasks.generate_list(self.cli)
         # test values in the objects instead of objects
         for got in tasks.task_list:
-            gf = got.__dict__['filename']
-            for k in expected[gf].keys():
-                self.assertEqual(got.__dict__[k], expected[gf][k])
+            got_f = got.__dict__['filename']
+            for key in expected[got_f].keys():
+                self.assertEqual(got.__dict__[key], expected[got_f][key])
         self._restore_cwd()
 
     def test_tasks_finalize(self):
@@ -158,18 +159,17 @@
             os.makedirs(self.cli.outdir)
         tasks.generate_list(self.cli)
         tasks.finalize(self.cli)
-        i = 0
         self._restore_cwd()
-        sf  = open(os.path.join(self.cli.outdir,
+        scf = open(os.path.join(self.cli.outdir,
                                 '_service:snapcraft:snapcraft.yaml'), 'r')
-        got = sf.read()
-        sf.close()
+        got = scf.read()
+        scf.close()
         self.assertEqual(got, expected)
 
     def test_cleanup(self):
         tasks  = TarSCM.tasks()
-        cn     = self.__class__.__name__
-        cn_dir = os.path.join(self.tmp_dir, cn)
+        cln    = self.__class__.__name__
+        cn_dir = os.path.join(self.tmp_dir, cln)
         if not os.path.exists(self.tmp_dir):
             os.mkdir(self.tmp_dir)
         if not os.path.exists(cn_dir):
@@ -183,31 +183,37 @@
 
     def test_get_version(self):
         class FakeSCM():
+            # pylint: disable=unused-argument,no-self-use,no-init,
+            # pylint: disable=too-few-public-methods
             def detect_version(self, args):
                 return '0.0.1'
 
         scm     = FakeSCM()
         tasks   = TarSCM.tasks()
-        v       = tasks.get_version(scm, self.cli)
-        self.assertEqual(v, '0.0.1')
+        ver     = tasks.get_version(scm, self.cli)
+        self.assertEqual(ver, '0.0.1')
         self.cli.versionprefix = "r"
-        v       = tasks.get_version(scm, self.cli)
-        self.assertEqual(v, 'r.0.0.1')
+        ver     = tasks.get_version(scm, self.cli)
+        self.assertEqual(ver, 'r.0.0.1')
 
-    def test_get_version_with_versionrewrite(self):
+    def test_get_version_with_versionrw(self):
+        '''Test for get_version with versionrewrite'''
         class FakeSCM():
+            # pylint: disable=unused-argument,no-self-use,no-init,
+            # pylint: disable=too-few-public-methods
             def detect_version(self, args):
                 return 'v0.0.1'
-        self.cli.versionrewrite_pattern = 'v(\d[\d\.]*)'
+
+        self.cli.versionrewrite_pattern = r'v(\d[\d\.]*)'
         self.cli.versionrewrite_replacement = '\\1-stable'
         scm     = FakeSCM()
         tasks   = TarSCM.tasks()
-        v       = tasks.get_version(scm, self.cli)
-        self.assertEqual(v, '0.0.1-stable')
+        ver     = tasks.get_version(scm, self.cli)
+        self.assertEqual(ver, '0.0.1-stable')
 
     def test_process_list(self):
         tasks   = TarSCM.tasks()
         self.cli.snapcraft = False
-        tasks._process_single_task = MagicMock(name='_process_single_task')
+        tasks.process_single_task = MagicMock(name='process_single_task')
         tasks.generate_list(self.cli)
         tasks.process_list()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/test.py 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/test.py
--- old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/test.py      
2017-06-07 12:38:56.000000000 +0200
+++ new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/test.py      
2017-06-19 13:14:47.000000000 +0200
@@ -1,32 +1,42 @@
 #!/usr/bin/env python2
-#
-# This CLI tool is responsible for running the tests.
-# See TESTING.md for more information.
+'''
+This CLI tool is responsible for running the tests.
+See TESTING.md for more information.
+'''
+from __future__ import print_function
 
 import os
 import re
 import shutil
 import sys
 
-from gittests import GitTests
-from svntests import SvnTests
-from hgtests  import HgTests
-from bzrtests import BzrTests
-from testenv import TestEnvironment
-from unittestcases import UnitTestCases
-from tasks import TasksTestCases
-from scm import SCMBaseTestCases
+
+from tests.gittests import GitTests
+from tests.svntests import SvnTests
+from tests.hgtests  import HgTests
+from tests.bzrtests import BzrTests
+from tests.testenv import TestEnvironment
+from tests.unittestcases import UnitTestCases
+from tests.tasks import TasksTestCases
+from tests.scm import SCMBaseTestCases
 
 if sys.version_info < (2, 7):
     import unittest2 as unittest
 else:
     import unittest
 
-if __name__ == '__main__':
-    suite = unittest.TestSuite()
-    testclasses = [
+
+def str_to_class(string):
+    '''Convert string into class'''
+    return getattr(sys.modules[__name__], string)
+
+
+def prepare_testclasses():
+    tclasses = [
         # If you are only interested in a particular VCS, you can
-        # temporarily comment out any of these:
+        # temporarily comment out any of these or use the env variable
+        # TAR_SCM_TC=<comma_separated_list> test.py
+        # 
TAR_SCM_TC=UnitTestCases,TasksTestCases,SCMBaseTestCases,GitTests,SvnTests,HgTests
         UnitTestCases,
         TasksTestCases,
         SCMBaseTestCases,
@@ -36,45 +46,56 @@
         BzrTests
     ]
 
+    if os.getenv('TAR_SCM_TC'):
+        tclasses = []
+        for classname in os.environ['TAR_SCM_TC'].split(','):
+            tclasses.append(str_to_class(classname))
+
+    return tclasses
+
+
+def prepare_testsuite(tclasses):
+    testsuite = unittest.TestSuite()
+
     if len(sys.argv) == 1:
-        for testclass in testclasses:
+        for testclass in tclasses:
             all_tests = unittest.TestLoader().loadTestsFromTestCase(testclass)
-            suite.addTests(all_tests)
+            testsuite.addTests(all_tests)
     else:
         # By default this uses the CLI args as string or regexp
         # matches for names of git tests, but you can tweak this to run
         # specific tests, e.g.:
-        #
-        #   suite.addTest(HgTests('test_version_versionformat'))
-        #   suite.addTest(HgTests('test_versionformat_dateYYYYMMDD'))
-        test_class = GitTests
-        # test_class = TasksTestCases
-        # test_class = UnitTestCases
-        to_run = {}
-        for arg in sys.argv[1:]:
-            m = re.match('^/(.+)/$', arg)
-            if m:
-                # regexp mode
-                regexp = m.group(1)
-                matcher = lambda t: re.search(regexp, t)
-            else:
-                matcher = lambda t: t == arg
-            for t in dir(test_class):
-                if not t.startswith('test_'):
-                    continue
-                if matcher(t):
-                    to_run[t] = True
-
-        for t in to_run.keys():
-            suite.addTest(test_class(t))
+        # PYTHONPATH=.:tests tests/test.py test_versionformat
+        for test_class in tclasses:
+            to_run = {}
+            for arg in sys.argv[1:]:
+                rmatch = re.match('^/(.+)/$', arg)
+                if rmatch:
+                    # regexp mode
+                    regexp = rmatch.group(1)
+                    matcher = lambda t, r=regexp: re.search(r, t)
+                else:
+                    matcher = lambda t, a=arg: t == a
+                for tdir in dir(test_class):
+                    if not tdir.startswith('test_'):
+                        continue
+                    if matcher(tdir):
+                        to_run[tdir] = True
+
+            for trun in to_run:
+                testsuite.addTest(test_class(trun))
+    return testsuite
+
+
+def main():
+    test_classes = prepare_testclasses()
+    suite = prepare_testsuite(test_classes)
 
     runner_args = {
-        # 'verbosity' : 2,
+        # 'verbosity': 2,
+        # 'failfast': True,
+        'buffer': True
     }
-    major, minor, micro, releaselevel, serial = sys.version_info
-    # New in 2.7 but available in earlier versions via unittest2
-    runner_args['buffer'] = True
-    # runner_args['failfast'] = True
 
     runner = unittest.TextTestRunner(**runner_args)
     result = runner.run(suite)
@@ -88,3 +109,6 @@
         print("Left temporary files in %s" % TestEnvironment.tmp_dir)
         print("You should remove these prior to the next test run.")
         sys.exit(1)
+
+if __name__ == '__main__':
+    main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/utils.py 
new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/utils.py
--- old/obs-service-tar_scm-0.7.0.1496831936.d960322/tests/utils.py     
2017-06-07 12:38:56.000000000 +0200
+++ new/obs-service-tar_scm-0.7.0.1497870887.fa1750b/tests/utils.py     
2017-06-19 13:14:47.000000000 +0200
@@ -1,6 +1,7 @@
 #!/usr/bin/env python2
 #
 # Simple utility functions to help executing processes.
+from __future__ import print_function
 
 import os
 import re
@@ -21,11 +22,11 @@
 
 
 def run_cmd(cmd):
-    p = subprocess.Popen(cmd, shell=True,
-                         stdout=subprocess.PIPE,
-                         stderr=subprocess.PIPE)
-    (stdout, stderr) = p.communicate()
-    return (stdout, stderr, p.returncode)
+    proc = subprocess.Popen(cmd, shell=True,
+                            stdout=subprocess.PIPE,
+                            stderr=subprocess.PIPE)
+    (stdout, stderr) = proc.communicate()
+    return (stdout, stderr, proc.returncode)
 
 
 def quietrun(cmd):


Reply via email to