Displaying 20 results from an estimated 900 matches similar to: "[PATCH 0/8] python: PEP 8 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:
2020 Jan 10
9
[PATCH v2 0/8] Various Python pycodestyle fixes
Fixes all the pycodestyle issues in the Python bindings, overring one
that does not make sense to change (and it's in setup.py, so almost
irrelevant).
Add a simple optional pycodestyle-based test to avoid regressions in the
future.
Pino Toscano (8):
python: PEP 8: adapt empty lines
python: PEP 8: adapt whitespaces in lines
python: tests: catch specific exception
python: tests:
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
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)
---
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.
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 ++++++++++++++++++++++++++---------------
2016 Feb 15
1
[PATCH] Start adding return values tests for bindings
Introduce a new kind of bindings tests, 090-retvalues, to check all the
possible return values in bindings; start implementing them for
scripting languages such as GObject introspection, Perl, PHP, Python,
and Ruby, reusing existing implementations where existing.
---
docs/guestfs-hacking.pod | 1 +
gobject/Makefile.am | 4 +-
2017 May 06
5
[Bug 1406906] [PATCH 0/3] Fix segmentation fault in Python bindings
This series addresses the issue where non UTF8 file names in a guest image lead to libguestfs segfault with Python 3 APIs.
The core issue is the APIs are not checking the return value when constructing a new PyObject. Therefore NULL pointers are added to Python collections (lists and dictionaries) crashing the application.
Few notes regarding the comments on the previous patch.
- Added a
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
+++
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 May 05
1
[PATCH] python: use constants instead of raw values
Extend the internal libguestfsmod module with the CREATE values, so
there is no need to hardcode values in GuestFS.__init__.
---
generator/python.ml | 7 +++++--
python/guestfs-py-byhand.c | 7 +++++++
python/guestfs-py.h | 2 ++
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/generator/python.ml b/generator/python.ml
index 9744b8f..470abe7 100644
---
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 Feb 12
1
Re: [PATCH] python: tests: use more targeted assert*() functions/checks
On Friday 12 February 2016 17:13:17 Richard W.M. Jones wrote:
> On Fri, Feb 12, 2016 at 06:04:47PM +0100, Pino Toscano wrote:
> > - 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
2005 Aug 02
1
JavaScript unit testing
Hi list,
With the very latest SVN trunk of script.aculo.us having all sorts of
nice unit testing thanks to efforts of Jon Tirsen (and some make-it-
look-good additions from Michael Schuerig) a very nice framework for
(more or less pragmatic) in-browser unit testing of JavaScript (and
HTML!) has come in to place (it''s still to be considered quite alpha,
but it basically works).
2016 Feb 23
2
[PATCH 1/2] Revert "ruby: Run tests one at a time, instead of in parallel."
It seems the default behaviour of rake is to run tests sequentially, and
not in parallel (there are separate gems to achieve that behaviour).
Hence just invoke "rake test" to run all the available tests at once.
This reverts commit 8f30c3c3f8c063f7c5ff8c6154d881e07a820251.
---
ruby/run-ruby-tests | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git
2017 May 21
3
[PATCH 0/2] python: improved UTF8 decoding error handling
The Python 3 bindings currently are unable to deal with non UTF8 characters.
This series continues what proposed in RHBZ#1406906.
A new function 'set_decode_error_handler' allows the User to specify
how to deal with decoding errors.
The default behaviour will be raising a UnicodeDecodeError.
If the handler is changed to 'surrogateescape', non UTF8 characters will be escaped
in a
2005 Sep 25
1
Prototype "classes" and inheritance
JavaScript doesn''t (yet) have a notion of classes. Prototype.js just
adds a suitable convention for implementing them. It provides a way to
create a new class by extending a base class using Object.extend, but
it doesn''t handle method inheritance. There are ways of doing
implementing this through traversing the chain of prototypes, but I''m
not sure they are
2019 Mar 28
8
[PATCH v2 0/4] OCaml tools: output messages as JSON machine
Enhance the output in machine parseable mode, by outputting all the
messages of OCaml tools as JSON to the machine parseable stream.
Related, although not strictly needed for this (and thus can be split
if requested), is the addition of the fd format for the machine
readable stream.
Changes from v1:
- use Obj.magic to convert int -> Unix.file_descr
- add tests
Pino Toscano (4):
2015 Oct 06
6
[PATCH 0/4] ocaml: Allow Guestfs.t handle to be garbage collected.
Allow Guestfs.t handle to be garbage collected, and add a
regression test.
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