search for: test_rint

Displaying 5 results from an estimated 5 matches for "test_rint".

Did you mean: test_int
2016 Jun 07
0
[PATCH 2/2] ruby: tests: Give each test class and method a unique name.
...it a/ruby/t/tc_090_retvalues.rb b/ruby/t/tc_090_retvalues.rb index 1fcc12d..4bcc8b5 100644 --- a/ruby/t/tc_090_retvalues.rb +++ b/ruby/t/tc_090_retvalues.rb @@ -17,8 +17,8 @@ require File::join(File::dirname(__FILE__), 'test_helper') -class TestLoad < MiniTest::Unit::TestCase - def test_rint +class Test090RetValues < MiniTest::Unit::TestCase + def test_090_retvalues g = Guestfs::Guestfs.new() assert_equal 10, g.internal_test_rint("10") diff --git a/ruby/t/tc_100_launch.rb b/ruby/t/tc_100_launch.rb index b79b984..1f89023 100644 --- a/ruby/t/tc_100_launch.rb +++...
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 Feb 15
1
[PATCH] Start adding return values tests for bindings
...ail = true; - } - } - if (!threw) { - print(f + " failed to throw an error"); - fail = true; - } -} - -function eq_fail(f, v) { - print(f + " returned unexpected value: " + v); - fail = true; -} - -var g = new Guestfs.Session(); - -var v; -var eq; - -v = g.internal_test_rint('1'); -v == 1 || eq_fail('internal_test_rint', v); -check_error('internal_test_rinterr'); - -v = g.internal_test_rint64('1'); -v == 1 || eq_fail('internal_test_rint64', v); -check_error('internal_test_rint64err'); - -v = g.internal_test_rbool('tru...
2016 Feb 22
3
[PATCH 1/3] python: tests: refactor to use unittest's discovery
...ublic License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -# Test all the different return values. - -import unittest -import guestfs - - -class Test090PythonRetValues (unittest.TestCase): - def test_rint (self): - g = guestfs.GuestFS () - - self.assertAlmostEqual (g.internal_test_rint ("10"), 10, places=1) - - self.assertRaises (RuntimeError, g.internal_test_rinterr) - - - def test_rint64 (self): - g = guestfs.GuestFS () - - self.assertAlmostEqual (g....
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