From: Detlef R. <det...@gm...> - 2016-05-30 15:20:01
|
Hi, for a gtk application I use Test::Unit for tests of the internal functionality of self made widgets. This worked very well for a long time. But now, with adding further tests it fails. I have two tests for the same widget class, each with several assertions. The widget is created in the "setup" method and in the tests only methods of the widget are called. The second test fails with the following message: Error: test_Foobla_view_do_undo__0(TestFooblaView): RuntimeError: ruby wrapper for this GObject* already exists. /home/det/.gem/ruby/2.3.0/gems/gobject-introspection-3.0.9/lib/gobject-introspection/loader.rb:307:in `invoke' /home/det/.gem/ruby/2.3.0/gems/gobject-introspection-3.0.9/lib/gobject-introspection/loader.rb:307:in `block (2 levels) in load_constructor_infos' /home/det/.gem/ruby/2.3.0/gems/gobject-introspection-3.0.9/lib/gobject-introspection/loader.rb:323:in `block in load_constructor_infos' /home/det/.gem/ruby/2.3.0/gems/gdk3-3.0.9/lib/gdk3/cursor.rb:28:in `initialize' /home/det/Schreibtisch/code/Foobla/lib/Foobla/view.rb:28:in `new' /home/det/Schreibtisch/code/Foobla/lib/Foobla/view.rb:28:in `initialize' /home/det/Schreibtisch/code/Foobla/test/test-Foobla-view.rb:5:in `new' /home/det/Schreibtisch/code/Foobla/test/test-Foobla-view.rb:5:in `setup' The failing call in the widgets implementation is: @pointerWriteMark = Gdk::Cursor.new :xterm it is called in the widgets initialize method. Do I have to do some kind of clean up on the Gtk/Gdk level between tests? Other ideas? Thanks detlef |