search for: log_invok

Displaying 11 results from an estimated 11 matches for "log_invok".

Did you mean: log_info
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
2016 Feb 23
0
[PATCH 2/2] ruby: tests: use more asserts instead of manual checks
...end end diff --git a/ruby/t/tc_420_log_messages.rb b/ruby/t/tc_420_log_messages.rb index 90a1360..e64ea74 100644 --- a/ruby/t/tc_420_log_messages.rb +++ b/ruby/t/tc_420_log_messages.rb @@ -45,8 +45,6 @@ class TestLoad < MiniTest::Unit::TestCase g.set_autosync(1) g.close() - if log_invoked == 0 - raise "log_invoked should be > 0" - end + refute_equal 0, log_invoked end end diff --git a/ruby/t/tc_810_rhbz664558c6.rb b/ruby/t/tc_810_rhbz664558c6.rb index 7e27db2..347e403 100644 --- a/ruby/t/tc_810_rhbz664558c6.rb +++ b/ruby/t/tc_810_rhbz664558c6.rb @@ -38,...
2016 Feb 12
2
[PATCH] python: tests: use more targeted assert*() functions/checks
...est.main () diff --git a/python/t/420-log-messages.py b/python/t/420-log-messages.py index 002098e..6b7c06c 100644 --- a/python/t/420-log-messages.py +++ b/python/t/420-log-messages.py @@ -51,7 +51,7 @@ class Test420LogMessages (unittest.TestCase): g.close () - self.assertFalse (log_invoked == 0) + self.assertNotEqual (log_invoked, 0) if __name__ == '__main__': unittest.main () diff --git a/python/t/800-explicit-close.py b/python/t/800-explicit-close.py index 9b425af..4086829 100644 --- a/python/t/800-explicit-close.py +++ b/python/t/800-explicit-close.py @@ -...
2016 Feb 22
3
[PATCH 1/3] python: tests: refactor to use unittest's discovery
...l Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -import unittest -import os -import guestfs - -log_invoked = 0 - -def log_callback (ev,eh,buf,array): - global log_invoked - log_invoked += 1 - - if ev == guestfs.EVENT_APPLIANCE: - buf = buf.rstrip() - - # Log what happened. - print ("python event logged: event=%s eh=%d buf='%s' array=%s" % - (guestfs.ev...
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 Jun 07
0
[PATCH 2/2] ruby: tests: Give each test class and method a unique name.
..._420_log_messages.rb @@ -17,8 +17,8 @@ require File::join(File::dirname(__FILE__), 'test_helper') -class TestLoad < MiniTest::Unit::TestCase - def test_events +class Test420LogMessages < MiniTest::Unit::TestCase + def test_420_log_messages g = Guestfs::Guestfs.new() log_invoked = 0 diff --git a/ruby/t/tc_800_rhbz507346.rb b/ruby/t/tc_800_rhbz507346.rb index eb516fb..60dd345 100644 --- a/ruby/t/tc_800_rhbz507346.rb +++ b/ruby/t/tc_800_rhbz507346.rb @@ -17,8 +17,8 @@ require File::join(File::dirname(__FILE__), 'test_helper') -class TestLoad < MiniTest::Uni...
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
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.
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:
2013 Dec 27
0
[PATCH] ruby: Fix .new method (RHBZ#1046509).
...t/tc_420_log_messages.rb index 3fe70de..b734fb8 100644 --- a/ruby/t/tc_420_log_messages.rb +++ b/ruby/t/tc_420_log_messages.rb @@ -22,7 +22,7 @@ require 'guestfs' class TestLoad < Test::Unit::TestCase def test_events - g = Guestfs::create() + g = Guestfs::Guestfs.new() log_invoked = 0 log = Proc.new {| event, event_handle, buf, array | diff --git a/ruby/t/tc_800_rhbz507346.rb b/ruby/t/tc_800_rhbz507346.rb index e380b73..66e0e92 100644 --- a/ruby/t/tc_800_rhbz507346.rb +++ b/ruby/t/tc_800_rhbz507346.rb @@ -22,7 +22,7 @@ require 'guestfs' class TestLoad <...
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: