Skip to content

Commit

Permalink
#1773: add encoding test
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@23113 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jul 10, 2019
1 parent 551954f commit bf10c8a
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions src/unittests/unit/client/mixins/encodings_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env python
# This file is part of Xpra.
# Copyright (C) 2019 Antoine Martin <[email protected]>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.

import unittest

from xpra.util import AdHocStruct, typedict
from xpra.client.mixins.encodings import Encodings
from unit.client.mixins.clientmixintest_util import ClientMixinTest


class DisplayClientTest(ClientMixinTest):

def test_display(self):
x = Encodings()
opts = AdHocStruct()
opts.encoding = ""
opts.encodings = ["rgb", "png"]
opts.quality = 0
opts.min_quality = 20
opts.speed = 0
opts.min_speed = 20
opts.video_scaling = "no"
opts.video_decoders = []
opts.csc_modules = []
opts.video_encoders = []

x.init(opts)
assert x.get_caps() is not None
x.server_capabilities = typedict({
"encodings" : ["rgb"],
"encodings.core" : ["rgb32", "rgb24", "png"],
"encodings.problematic" : [],
"encoding" : ""
})
x.parse_server_capabilities()

def main():
unittest.main()


if __name__ == '__main__':
main()

0 comments on commit bf10c8a

Please sign in to comment.