コード例 #1
0
ファイル: keyboard_test.py プロジェクト: Sabayon/anaconda
    def layout_variant_joining_test(self):
        """Should correctly join keyboard layout and variant to a string spec."""

        # both layout and variant specified
        self.assertEqual(keyboard._join_layout_variant("cz", "qwerty"),
                         "cz (qwerty)")

        # no variant specified
        self.assertEqual(keyboard._join_layout_variant("cz"), "cz")
コード例 #2
0
    def layout_variant_joining_test(self):
        """Should correctly join keyboard layout and variant to a string spec."""

        # both layout and variant specified
        self.assertEqual(keyboard._join_layout_variant("cz", "qwerty"),
                         "cz (qwerty)")

        # no variant specified
        self.assertEqual(keyboard._join_layout_variant("cz"), "cz")
コード例 #3
0
ファイル: keyboard_test.py プロジェクト: Sabayon/anaconda
    def layout_variant_parse_join_test(self):
        """Parsing and joining valid layout and variant spec should have no effect."""

        specs = ("cz", "cz (qwerty)")
        for spec in specs:
            (layout, variant) = keyboard.parse_layout_variant(spec)
            self.assertEqual(spec, keyboard._join_layout_variant(layout, variant))
コード例 #4
0
    def layout_variant_parse_join_test(self):
        """Parsing and joining valid layout and variant spec should have no effect."""

        specs = ("cz", "cz (qwerty)")
        for spec in specs:
            (layout, variant) = keyboard.parse_layout_variant(spec)
            self.assertEqual(spec,
                             keyboard._join_layout_variant(layout, variant))