similar to: [PATCH 1/3] python: tests: refactor to use unittest's discovery

Displaying 20 results from an estimated 6000 matches similar to: "[PATCH 1/3] python: tests: refactor to use unittest's discovery"

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 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 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 +-
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:
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 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 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 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
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 ++++++++++++++++++++++++++---------------
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
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
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 ++--
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
2017 May 06
0
[Bug 1406906] [PATCH 3/3] python: add regression test for RHBZ#1406906
Signed-off-by: Matteo Cafasso <noxdafox@gmail.com> --- python/t/test830RHBZ1406906.py | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 python/t/test830RHBZ1406906.py diff --git a/python/t/test830RHBZ1406906.py b/python/t/test830RHBZ1406906.py new file mode 100644 index 000000000..62caf8ce1 --- /dev/null +++
2016 Feb 23
0
[PATCH 2/2] ruby: tests: use more asserts instead of manual checks
Make more use of assert_equal/refute_equal instead of manually checking values and raising errors. --- ruby/t/tc_100_launch.rb | 4 +--- ruby/t/tc_410_close_event.rb | 8 ++------ ruby/t/tc_420_log_messages.rb | 4 +--- ruby/t/tc_810_rhbz664558c6.rb | 4 +--- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/ruby/t/tc_100_launch.rb b/ruby/t/tc_100_launch.rb index
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).
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 |
2019 Jul 31
0
Re: [PATCH] Rust bindings: Implement Event features
Hi Hiroyuki, On Tuesday, 30 July 2019 07:51:37 CEST Hiroyuki Katsura wrote: > This patch includes: > > - Event callback handlers > - Tests related to events(410-430) > --- Would it be possible to split the Handle -> Handle<'a> change in an own small patch? This way it can be documented why it was changed. > +pub fn event_to_string(events: &[guestfs::Event])
2019 Aug 05
2
[PATCH 2/2] Rust bindings: Implement callback handlers
This patch includes: - Event callback handlers - Tests related to events(410-430) src/bin/event.rs and src/bin/event_leak.rs are the PoCs that Boxes related to callbacks are not leaked. --- rust/src/bin/.gitkeep | 0 rust/src/bin/event.rs | 29 ++++++ rust/src/bin/event_leak.rs | 30 ++++++ rust/src/error.rs | 6 ++ rust/src/event.rs