Hello community,
here is the log from the commit of package python-salt-testing for
openSUSE:Factory checked in at 2014-01-03 14:50:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-salt-testing (Old)
and /work/SRC/openSUSE:Factory/.python-salt-testing.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-salt-testing"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-salt-testing/python-salt-testing.changes
2013-11-12 15:22:49.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.python-salt-testing.new/python-salt-testing.changes
2014-01-03 14:50:28.000000000 +0100
@@ -1,0 +2,9 @@
+Thu Jan 2 16:41:27 UTC 2014 - [email protected]
+
+- Updated to version 0.5.4
+- Support Pylint >= 1.0 and still maintain support for older versions
+- Allow super() usage by turning old style classes into new style classes
+- Delete docker container once the tests suite ends
+- Fake some mocked object in order not to fail at import time(before mock
support checks)
+
+-------------------------------------------------------------------
Old:
----
SaltTesting-0.5.3.tar.gz
New:
----
SaltTesting-0.5.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-salt-testing.spec ++++++
--- /var/tmp/diff_new_pack.65aKzc/_old 2014-01-03 14:50:28.000000000 +0100
+++ /var/tmp/diff_new_pack.65aKzc/_new 2014-01-03 14:50:28.000000000 +0100
@@ -17,7 +17,7 @@
Name: python-salt-testing
-Version: 0.5.3
+Version: 0.5.4
Release: 0
Summary: Testing tools needed in the several Salt Stack projects
License: Apache-2.0
++++++ SaltTesting-0.5.3.tar.gz -> SaltTesting-0.5.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SaltTesting-0.5.3/AUTHORS.rst
new/SaltTesting-0.5.4/AUTHORS.rst
--- old/SaltTesting-0.5.3/AUTHORS.rst 2013-11-12 06:14:36.000000000 +0100
+++ new/SaltTesting-0.5.4/AUTHORS.rst 2014-01-02 12:09:13.000000000 +0100
@@ -9,6 +9,7 @@
========================== ===================== ============================
Erik Johnson terminalmage [email protected]
Henrik Holmboe holmboe
+Mike Place cachedout [email protected]
Niels Abspoel aboe76
Pedro Algarvio s0undt3ch [email protected]
Thomas S. Hatch thatch45 [email protected]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SaltTesting-0.5.3/PKG-INFO
new/SaltTesting-0.5.4/PKG-INFO
--- old/SaltTesting-0.5.3/PKG-INFO 2013-11-12 06:22:43.000000000 +0100
+++ new/SaltTesting-0.5.4/PKG-INFO 2014-01-02 12:11:49.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: SaltTesting
-Version: 0.5.3
+Version: 0.5.4
Summary: Required testing tools needed in the several Salt Stack projects.
Home-page: http://saltstack.org
Author: Pedro Algarvio
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SaltTesting-0.5.3/SaltTesting.egg-info/PKG-INFO
new/SaltTesting-0.5.4/SaltTesting.egg-info/PKG-INFO
--- old/SaltTesting-0.5.3/SaltTesting.egg-info/PKG-INFO 2013-11-12
06:22:26.000000000 +0100
+++ new/SaltTesting-0.5.4/SaltTesting.egg-info/PKG-INFO 2014-01-02
12:11:33.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: SaltTesting
-Version: 0.5.3
+Version: 0.5.4
Summary: Required testing tools needed in the several Salt Stack projects.
Home-page: http://saltstack.org
Author: Pedro Algarvio
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SaltTesting-0.5.3/salttesting/helpers.py
new/SaltTesting-0.5.4/salttesting/helpers.py
--- old/SaltTesting-0.5.3/salttesting/helpers.py 2013-11-12
06:14:36.000000000 +0100
+++ new/SaltTesting-0.5.4/salttesting/helpers.py 2014-01-02
12:03:08.000000000 +0100
@@ -593,7 +593,9 @@
for name in names:
if name not in self.run_function('sys.doc'):
- reason = '{0!r} is not available'.format(name)
+ reason = 'Salt module {0!r} is not available'.format(
+ name
+ )
for fname in dir(self):
if not fname.startswith('test_'):
continue
@@ -616,7 +618,9 @@
for name in names:
if name not in cls.run_function('sys.doc'):
- cls.skipTest('{0!r} is not available'.format(name))
+ cls.skipTest(
+ 'Salt module {0!r} is not available'.format(name)
+ )
break
return caller(cls)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SaltTesting-0.5.3/salttesting/mock.py
new/SaltTesting-0.5.4/salttesting/mock.py
--- old/SaltTesting-0.5.3/salttesting/mock.py 2013-11-12 06:14:36.000000000
+0100
+++ new/SaltTesting-0.5.4/salttesting/mock.py 2014-01-02 12:03:08.000000000
+0100
@@ -35,6 +35,9 @@
NO_MOCK = True
NO_MOCK_REASON = 'mock python module is unavailable'
+
+ # Let's not fail on imports by providing fake objects and classes
+
class MagicMock(object):
__name__ = '{0}.fakemock'.format(__name__)
@@ -53,6 +56,12 @@
Mock = MagicMock
patch = MagicMock()
+ sentinel = object()
+ DEFAULT = object()
+ create_autospec = MagicMock()
+ FILTER_DIR = True
+ NonCallableMock = MagicMock()
+ NonCallableMagicMock = MagicMock()
call = tuple
ANY = object()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SaltTesting-0.5.3/salttesting/parser/__init__.py
new/SaltTesting-0.5.4/salttesting/parser/__init__.py
--- old/SaltTesting-0.5.3/salttesting/parser/__init__.py 2013-11-12
06:14:36.000000000 +0100
+++ new/SaltTesting-0.5.4/salttesting/parser/__init__.py 2014-01-02
12:03:08.000000000 +0100
@@ -24,8 +24,8 @@
from salttesting import TestLoader, TextTestRunner
try:
from salttesting.ext import console
- width, height = console.getTerminalSize()
- PNUM = width
+ WIDTH, HEIGHT = console.getTerminalSize()
+ PNUM = WIDTH
except Exception:
PNUM = 70
@@ -182,6 +182,7 @@
self.options, self.args = optparse.OptionParser.parse_args(
self, args, values
)
+ print_header(u'', inline=True)
self.pre_execution_cleanup()
self._validate_options()
@@ -195,14 +196,14 @@
# code we get from the docker container execution
self.exit(self.run_suite_in_docker())
- print('Current Directory: {0}'.format(os.getcwd()))
- print_header(
- 'Test suite is running under PID {0}'.format(os.getpid()),
- bottom=False
- )
+ print(' * Current Directory: {0}'.format(os.getcwd()))
+ print(' * Test suite is running under PID {0}'.format(os.getpid()))
self._setup_logging()
- return (self.options, self.args)
+ try:
+ return (self.options, self.args)
+ finally:
+ print_header(u'', inline=True)
def setup_additional_options(self):
'''
@@ -260,9 +261,7 @@
logging.root.addHandler(filehandler)
logging.root.setLevel(logging.DEBUG)
- print_header(
- 'Logging tests on {0}'.format(self.tests_logfile), bottom=False
- )
+ print(' * Logging tests on {0}'.format(self.tests_logfile))
# With greater verbosity we can also log to the console
if self.options.verbosity > 2:
@@ -499,6 +498,8 @@
container
)
)
+
+ cidfile = tempfile.mktemp(prefix='docked-testsuite-', suffix='.cid')
call = subprocess.Popen(
['docker',
'run',
@@ -506,6 +507,13 @@
'{0}:/salt-source'.format(self.source_code_basedir),
'-w',
'/salt-source',
+ '-e',
+ 'SHELL=/bin/sh',
+ '-e',
+ 'COLUMNS={0}'.format(WIDTH),
+ '-e',
+ 'LINES={0}'.format(HEIGHT),
+ '-cidfile={0}'.format(cidfile),
container,
] + calling_args,
env=os.environ.copy(),
@@ -537,6 +545,21 @@
call.send_signal(signal.SIGINT)
call.wait()
+ time.sleep(2)
+
+ print_header('', inline=True)
+ print(' Cleaning Up Temporary Docker Container:'),
+ sys.stdout.flush()
+ cleanup_call = subprocess.Popen(
+ ['docker', 'rm', open(cidfile).read().strip()],
+ env=os.environ.copy(),
+ close_fds=True,
+ stdout=subprocess.PIPE
+ )
+ os.unlink(cidfile)
+ cleanup_call.wait()
+ print(cleanup_call.stdout.read().strip())
+ print_header('', inline=True)
self.exit(call.returncode)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SaltTesting-0.5.3/salttesting/pylintplugins/pep8.py
new/SaltTesting-0.5.4/salttesting/pylintplugins/pep8.py
--- old/SaltTesting-0.5.3/salttesting/pylintplugins/pep8.py 2013-11-12
06:14:36.000000000 +0100
+++ new/SaltTesting-0.5.4/salttesting/pylintplugins/pep8.py 2014-01-02
12:03:08.000000000 +0100
@@ -17,6 +17,7 @@
# Import PyLint libs
from pylint.interfaces import IRawChecker
from pylint.checkers import BaseChecker
+from pylint.__pkginfo__ import numversion as pylint_version_info
# Import PEP8 libs
try:
@@ -274,7 +275,9 @@
'''
_msgs = {
- 'W8291': ('PEP8 %s: trailing whitespace', 'trailing-whitespace'),
+ 'W8291': ('PEP8 %s: trailing whitespace',
+ 'trailing-whitespace' if pylint_version_info < (1, 0) else
+ 'pep8-trailing-whitespace'),
'W8292': ('PEP8 %s: no newline at end of file',
'no-newline-at-end-of-file'),
'W8293': ('PEP8 %s: blank line contains whitespace',
'blank-line-contains-whitespace'),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/SaltTesting-0.5.3/salttesting/pylintplugins/strings.py
new/SaltTesting-0.5.4/salttesting/pylintplugins/strings.py
--- old/SaltTesting-0.5.3/salttesting/pylintplugins/strings.py 2013-11-12
06:14:36.000000000 +0100
+++ new/SaltTesting-0.5.4/salttesting/pylintplugins/strings.py 2014-01-02
12:03:08.000000000 +0100
@@ -16,7 +16,12 @@
from pylint.checkers import utils
from pylint.checkers import BaseChecker
from pylint.checkers.utils import check_messages
-from pylint.interfaces import IASTNGChecker
+
+try:
+ # >= pylint 1.0
+ from pylint.interfaces import IAstroidChecker
+except ImportError: # < pylint 1.0
+ from pylint.interfaces import IASTNGChecker as IAstroidChecker
MSGS = {
@@ -33,7 +38,7 @@
class StringCurlyBracesFormatIndexChecker(BaseChecker):
- __implements__ = (IASTNGChecker,)
+ __implements__ = (IAstroidChecker,)
name = 'string'
msgs = MSGS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SaltTesting-0.5.3/salttesting/unit.py
new/SaltTesting-0.5.4/salttesting/unit.py
--- old/SaltTesting-0.5.3/salttesting/unit.py 2013-11-12 06:14:36.000000000
+0100
+++ new/SaltTesting-0.5.4/salttesting/unit.py 2014-01-02 12:03:08.000000000
+0100
@@ -17,14 +17,39 @@
if sys.version_info < (2, 7):
try:
from unittest2 import (
- TestLoader,
- TextTestRunner,
- TestCase as _TestCase,
+ TestLoader as _TestLoader,
+ TextTestRunner as _TextTestRunner,
+ TestCase as __TestCase,
expectedFailure,
- TestSuite,
+ TestSuite as _TestSuite,
skipIf,
- TestResult,
+ TestResult as _TestResult,
)
+
+ class NewStyleClassMixin(object):
+ '''
+ Simple new style class to make pylint shut up!
+
+ And also to avoid errors like:
+
+ 'Cannot create a consistent method resolution order (MRO) for
bases'
+ '''
+
+ class TestLoader(_TestLoader, NewStyleClassMixin):
+ pass
+
+ class TextTestRunner(_TextTestRunner, NewStyleClassMixin):
+ pass
+
+ class _TestCase(__TestCase, NewStyleClassMixin):
+ pass
+
+ class TestSuite(_TestSuite, NewStyleClassMixin):
+ pass
+
+ class TestResult(_TestResult, NewStyleClassMixin):
+ pass
+
except ImportError:
raise SystemExit('You need to install unittest2 to run the salt tests')
else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/SaltTesting-0.5.3/salttesting/version.py
new/SaltTesting-0.5.4/salttesting/version.py
--- old/SaltTesting-0.5.3/salttesting/version.py 2013-11-12
06:17:17.000000000 +0100
+++ new/SaltTesting-0.5.4/salttesting/version.py 2014-01-02
12:09:13.000000000 +0100
@@ -8,5 +8,5 @@
:license: Apache 2.0, see LICENSE for more details.
'''
-__version_info__ = (0, 5, 3)
+__version_info__ = (0, 5, 4)
__version__ = '.'.join(map(str, __version_info__))
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]