[Python-modules-commits] [python-tidylib] 01/02: Import python-tidylib_0.3.2~dfsg.orig.tar.gz
Dmitry Shachnev
mitya57 at moszumanska.debian.org
Thu Dec 15 08:34:31 UTC 2016
This is an automated email from the git hooks/post-receive script.
mitya57 pushed a commit to branch master
in repository python-tidylib.
commit a0709c705cf26433b4275bc7b34fcf55fe7344d2
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date: Thu Dec 15 11:29:49 2016 +0300
Import python-tidylib_0.3.2~dfsg.orig.tar.gz
---
PKG-INFO | 4 +++-
setup.py | 4 +++-
tests/test_init.py | 32 ++++++++++++++++++++++++++++++++
tidylib/tidy.py | 1 +
4 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/PKG-INFO b/PKG-INFO
index 5e6943e..8ea6b6f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pytidylib
-Version: 0.3.1
+Version: 0.3.2
Summary: Python wrapper for HTML Tidy (tidylib) on Python 2 and 3
Home-page: http://countergram.com/open-source/pytidylib/
Author: Jason Stitt
@@ -21,6 +21,8 @@ Description: `PyTidyLib`_ is a Python package that wraps the `HTML Tidy`_ librar
Changes
=======
+ * 0.3.2: Initialization bug fix
+
* 0.3.1: find_library support while still allowing a list of library names
* 0.3.0: Refactored to use Tidy and PersistentTidy classes while keeping the
diff --git a/setup.py b/setup.py
index dbc673d..8cff7a0 100644
--- a/setup.py
+++ b/setup.py
@@ -36,6 +36,8 @@ library's many capabilities include:
Changes
=======
+* 0.3.2: Initialization bug fix
+
* 0.3.1: find_library support while still allowing a list of library names
* 0.3.0: Refactored to use Tidy and PersistentTidy classes while keeping the
@@ -69,7 +71,7 @@ the `PyTidyLib`_ web page.
.. _`PyTidyLib`: http://countergram.com/open-source/pytidylib/
"""
-VERSION = "0.3.1"
+VERSION = "0.3.2"
setup(
name="pytidylib",
diff --git a/tests/test_init.py b/tests/test_init.py
new file mode 100644
index 0000000..4b797dc
--- /dev/null
+++ b/tests/test_init.py
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+# Copyright 2009-2016 Jason Stitt
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+from __future__ import unicode_literals
+
+import unittest
+from tidylib import Tidy, PersistentTidy, tidy_document
+
+
+class TestDocs1(unittest.TestCase):
+
+ def test_not_find_lib(self):
+ with self.assertRaises(OSError):
+ tidy = Tidy(lib_names=[])
diff --git a/tidylib/tidy.py b/tidylib/tidy.py
index d7fff95..9eea51f 100644
--- a/tidylib/tidy.py
+++ b/tidylib/tidy.py
@@ -82,6 +82,7 @@ class Tidy(object):
HTML and XHTML. """
def __init__(self, lib_names=None):
+ self._tidy = None
if lib_names is None:
lib_names = ctypes.util.find_library('tidy') or LIB_NAMES
if isinstance(lib_names, str):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-tidylib.git
More information about the Python-modules-commits
mailing list