similar to: [PATCH v2 0/8] Various Python pycodestyle fixes

Displaying 20 results from an estimated 200 matches similar to: "[PATCH v2 0/8] Various Python pycodestyle fixes"

2020 Jan 10
8
[PATCH 0/7] Various Python pycodestyle fixes
Fixes the majority of the pycodestyle issues in the Python bindings, leaving only an overly length line in setup.py. Add a simple optional pycodestyle-based test to avoid regressions in the future. Pino Toscano (7): python: PEP 8: adapt empty lines python: PEP 8: adapt whitespaces in lines python: tests: catch specific exception python: tests: improve variable naming python: tests:
2016 May 04
9
[PATCH 0/8] python: PEP 8 fixes
Hi, this series cleans up the Python sources, either static or generated, including also tests, to make them PEP 8 compliant; see https://www.python.org/dev/peps/pep-0008/ and tools like pep8. Almost all the issues reported by pep8 are fixed, reducing the issues from 3818 to 7. The changes should have no effect on the actual code, while it will help Python users with consistency with other
2016 Feb 22
3
[PATCH 1/3] python: tests: refactor to use unittest's discovery
Instead of running all the tests manually, the unittest module has a 'discovery' mode to run tests by importing them from a directory: this requires the tests to have different filenames, since they need to be imported as modules now (hence an empty __init__.py is added), and the current naming does not match the convention. Using unittest as loader/runner brings another change: tests
2019 Apr 03
1
[PATCH] Add missing python bindings tests
Signed-off-by: Hiroyuki Katsura <hiroyuki.katsura.0513@gmail.com> --- python/t/test020Create.py | 25 ++++++++++++++ python/t/test030CreateFlags.py | 27 +++++++++++++++ python/t/test040CreateMultiple.py | 32 ++++++++++++++++++ python/t/test050HandleProperties.py | 50 +++++++++++++++++++++++++++ python/t/test430ProgressMessages.py | 52 +++++++++++++++++++++++++++++ 5
2016 Jun 07
3
[PATCH 1/2] ruby: Print exceptions thrown by event callbacks.
--- generator/ruby.ml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/generator/ruby.ml b/generator/ruby.ml index 97ccfdc..0f71ccc 100644 --- a/generator/ruby.ml +++ b/generator/ruby.ml @@ -404,15 +404,17 @@ event_callback_wrapper_wrapper (VALUE argvv) return Qnil; } +/* Callbacks aren't supposed to throw exceptions. We just print the + * exception on
2016 Mar 24
1
Malformed XML if LIBGUESTFS_HV is defined.
I was going to post this as a patch, but I realize the patch is just working around an actual bug in the libvirt backend [not in libvirt]. Anyway, posting it here so we don't forget about it. Rich.
2016 Jun 07
0
[PATCH 2/2] ruby: tests: Give each test class and method a unique name.
'tc_410_close_event.rb' was not being run. You could prove this by simply inserting "exit 1" into that test. The reason is unclear, but by renaming every class and method in the tests to be unique, this ensures the tests are run. --- ruby/t/tc_010_load.rb | 4 ++-- ruby/t/tc_020_create.rb | 4 ++-- ruby/t/tc_030_create_flags.rb | 4 ++--
2020 Jan 15
1
[PATCH] build: define HAVE_PYCODESTYLE in all the cases
Fixes commit cad3ea9e74bcff0dd42dc2a3710c6b3fa6e868b1 in case Python is disabled, or not available. --- m4/guestfs-python.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/m4/guestfs-python.m4 b/m4/guestfs-python.m4 index 505eba5df..2e736875c 100644 --- a/m4/guestfs-python.m4 +++ b/m4/guestfs-python.m4 @@ -88,7 +88,6 @@ AS_IF([test "x$enable_python" !=
2019 Apr 24
4
[PATCH 0/3] Few minor changes for bindings
*** BLURB HERE *** Pino Toscano (3): python: modernize inspect_vm example perl: silence usage of add_cdrom in test python: silence usage of add_cdrom in test perl/t/060-handle-properties.t | 7 +++++-- python/examples/inspect_vm.py | 26 ++++++++++++-------------- python/t/test050HandleProperties.py | 5 ++++- 3 files changed, 21 insertions(+), 17 deletions(-) -- 2.20.1
2020 Jan 10
7
[v2v PATCH 0/6] Various Python pycodestyle fixes
Fixes the majority of the pycodestyle issues in the Python scripts, and fix the existing test-v2v-python-syntax.sh to use pycodestyle to actually perform style checks. Pino Toscano (6): PEP 8: adapt whitespaces in lines PEP 8: move imports at the top PEP 8: adapt empty lines tests: find all the Python scripts for syntax checks -o rhv-upload: remove unused Python imports Revamp check
2016 Feb 12
2
[PATCH] python: tests: use more targeted assert*() functions/checks
- use assertIsInstance, assertNotEqual, and assertIsNotNone as more specific checks (will produce better logging) - use assertRaises when expecting exceptions being thrown - when testing internal_test_rhashtable, instead of checking type and elements of the return values just check the return value as a whole (easier and already getting all the work needed by unittest) ---
2020 Jan 10
0
[PATCH v2 8/8] python: add a pycodestyle test
Look for pycodestyle, and use it to check all the Python sources (tests and auxiliary scripts included) of the Python bindings. --- config.sh.in | 1 + m4/guestfs-python.m4 | 3 +++ python/Makefile.am | 5 +++++ python/test-pycodestyle.sh | 28 ++++++++++++++++++++++++++++ 4 files changed, 37 insertions(+) create mode 100755 python/test-pycodestyle.sh diff --git
2020 Jan 10
0
[PATCH 7/7] python: add a pycodestyle test
Look for pycodestyle, and use it to check all the Python sources (tests and auxiliary scripts included) of the Python bindings. --- config.sh.in | 1 + m4/guestfs-python.m4 | 3 +++ python/Makefile.am | 5 +++++ python/test-pycodestyle.sh | 30 ++++++++++++++++++++++++++++++ 4 files changed, 39 insertions(+) create mode 100755 python/test-pycodestyle.sh diff --git
2020 Jan 10
0
[v2v PATCH 6/6] Revamp check for Python code style
It turns out that a) the standalone pep8 executable is deprecated in favour of pycodestyle b) $python-pep8 does not exist in modern distros and thus the style checks for Python scripts have been skipped for a long time. Instead, switch to pycodestyle directly, updating the list of ignored issues to the two categories left. --- config.sh.in | 1 + m4/guestfs-progs.m4 |
2019 Apr 24
0
[PATCH 3/3] python: silence usage of add_cdrom in test
One test explicitly tests add_cdrom, so silence the deprecation warning only for that function. --- python/t/test050HandleProperties.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/t/test050HandleProperties.py b/python/t/test050HandleProperties.py index e2b12f1dc..59de8b806 100644 --- a/python/t/test050HandleProperties.py +++ b/python/t/test050HandleProperties.py
2019 Dec 12
1
Re: Fwd: libguestfs incorrectly detects host CPU architecture
On Thu, Dec 12, 2019 at 11:01:02AM +0100, Vincent Danjean wrote: > [resend to the good (cloned) bug, sorry for the message in the original bug, > it was a mistake] > > Hi, > > On Thu, 5 Dec 2019 11:12:56 +0000 "Richard W.M. Jones" <rjones@redhat.com> wrote: > > I believe this is a new bug and nothing much to do with: > >
2017 May 09
1
[PATCH] RHBZ#1406906: check return value of Python object functions
Verify the returned values of Python Object constructor functions are not NULL before adding them to a collection. This is particularly relevant when constructing Unicode strings in Python 3 as they will return NULL if non UTF-8 characters are present. Signed-off-by: Matteo Cafasso <noxdafox@gmail.com> --- generator/python.ml | 102 ++++++++++++++++++++++++++---------------
2019 Dec 20
3
[common/libguestfs PATCH 0/2] Fix OCaml/Python linking
Make sure they can build also in no as-neede setups. Pino Toscano (1): utils: split string list functions in own file build: use split stringlist functions from common/utils utils/Makefile.am | 2 + utils/guestfs-stringlists-utils.h | 30 +++++ utils/guestfs-utils.h | 7 +- utils/stringlists-utils.c | 197 ++++++++++++++++++++++++++++++ utils/utils.c
2016 Feb 22
0
[PATCH 3/3] python: tests: fix long/int mismatch in test090RetValues.py
Cast the value to the "int_type" representing the "long" value for test_rint64, so the test works again with Python 3. --- python/t/test090RetValues.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/t/test090RetValues.py b/python/t/test090RetValues.py index 7ff51f0..24d97b4 100644 --- a/python/t/test090RetValues.py +++
2019 Dec 20
0
[common/libguestfs PATCH 2/2] build: use split stringlist functions from common/utils
The OCaml and Python bindings directly use the utils.c source in common/utils, mostly for guestfs_int_free_string_list. That source contained also functions using gnulib functions, however without linking to gnulib. When building with default build flags (e.g. without as-needed mode), the gnulib symbols cannot be resolved, leading to unusable OCaml and Python libraries. As solution, update the