Displaying 20 results from an estimated 300 matches similar to: "[PATCH] python: tests: use more targeted assert*() functions/checks"
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 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 +-
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
2016 Feb 12
0
Re: [PATCH] python: tests: use more targeted assert*() functions/checks
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 checking type and
> elements of the return values just check the return value as a
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
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
2017 May 21
0
[PATCH 2/2] python: unicode decode handler error scheme setter
The set_decode_error_handler function allows the User to set the
decoding error scheme to be used when non UTF8 characters are
encountered in Python 3.
The function has no effect in Python 2.
Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
---
generator/python.ml | 16 ++++++++++++++++
python/handle.c | 18 ++++++++++++++++--
python/t/test830RHBZ1406906.py |
2017 May 11
1
[PATCH v2] 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 ++++++++++++++++++++++++++---------------
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 Jan 28
1
[PATCH] python: stop using parens-less print in tests
print "" is no more available in Python 3, and print(...) is available
since Python 2.7; as one of the tests was using print(), use this form
everywhere so the tests can run fine with Python 3.
---
python/t/820-rhbz912499.py | 18 +++++++++---------
python/t/910-libvirt.py | 4 ++--
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/python/t/820-rhbz912499.py
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
0
[PATCH v2 4/4] OCaml tools: output messages into JSON for machine readable
When the machine readable mode is enabled, print all the messages
(progress, info, warning, and errors) also as JSON in the machine
readable stream: this way, users can easily parse the status of the
OCaml tool, and report that back.
The formatting of the current date time into the RFC 3999 format is done
in C, because of the lack of OCaml APIs for this.
---
.gitignore
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 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
+++
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
2011 Feb 21
2
[LLVMdev] A working garbage collector - finally :)
Well, after many months of effort, my LLVM-based garbage collector is
finally passing its unit tests. This represents a significant milestone for
me in the development of my programming language, Tart.
The collector itself is fairly rudimentary - a single-generation, copying
collector. It does not yet support multi-threaded programs, but in practice
there's no serious obstacle to supporting
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 ++++++++++++++++++++++++++---------------
2012 Oct 23
0
Get data of Physical Machine
Hey,
What kind of data de NodeInfo represents? With my researches I thought that
it should return the data of the physical machine. But in my tests, when I
run with diferents URLs in Connect creation the values of nodeInfo
variables are differents. For example: it's the same machine, but if I run
with xen:/// the memory is X and if I run with qemu:///session the memory
is Y.
Connect conn =
2020 Jun 30
0
Trouble to keep replication in sync - W2008R2
Hi,
I have 3 Debian Buster DC running Samba 4.12.3, each one on a site.
Now I have to add a Windows 2008R2 server as DC, but failing miserably
to stabilize it for the past 2 weeks. First, kcc did not created NTDS
connections automatically, had to create them by hand. Some days have
passed and now when I try to replicate from samba to windows, *both on
same site*, I get this:
root at