Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pygobject pygobject
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 303
    • Issues 303
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 32
    • Merge requests 32
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • pygobjectpygobject
  • Issues
  • #163
Closed
Open
Issue created Feb 11, 2018 by Ghost User@ghostContributor

Unit test failures in test_atoms.py

===================================================================================== FAILURES =====================================================================================
____________________________________________________________________________ TestGdkAtom.test_out_array ____________________________________________________________________________

self = <test_atoms.TestGdkAtom testMethod=test_out_array>

    @unittest.skipIf(sys.platform == "darwin", "fails on OSX")
    def test_out_array(self):
        a_selection = Gdk.Atom.intern('my_clipboard', False)
        clipboard = Gtk.Clipboard.get(a_selection)
    
        # empty
        (res, targets) = clipboard.wait_for_targets()
        self.assertEqual(res, False)
        self.assertEqual(targets, [])
    
        # text
        clipboard.set_text('hello', 5)
        (res, targets) = clipboard.wait_for_targets()
>       self.assertEqual(res, True)
E       AssertionError: False != True

____________________________________________________________________________ TestGdkAtom.test_out_glist ____________________________________________________________________________

self = <test_atoms.TestGdkAtom testMethod=test_out_glist>

    @unittest.skipIf(sys.platform == "darwin" or os.name == "nt",
                     "fails on OSX/Windows")
    @unittest.skipIf(not Gdk or Gdk._version == "4.0", "not in gdk4")
    def test_out_glist(self):
        display = Gdk.Display.get_default()
        with capture_glib_deprecation_warnings():
            dm = display.get_device_manager()
            device = dm.get_client_pointer()
        axes = device.list_axes()
>       axes_names = [atom.name() for atom in axes]

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

.0 = <list_iterator object at 0x7fde4f4122e8>

>   axes_names = [atom.name() for atom in axes]
E   AttributeError: 'NoneType' object has no attribute 'name'

In test_out_glist the gdk_device_list_axes returns a list with two GDK_NONE (null pointer) as elements.

Both failures could be related to the fact that I am running tests under Wayland.

Assignee
Assign to
Time tracking