Ejemplo n.º 1
0
    def test_get_symbol_id_uses_const(self):
        ref = get_symbol_id(model_symbol_id=15,
                            n_symbols=5,
                            accents_use_own_symbols=True,
                            shared_symbol_count=SHARED_SYMBOLS_COUNT)

        res = get_symbol_id(model_symbol_id=15,
                            n_symbols=5,
                            accents_use_own_symbols=True)

        self.assertEqual(ref, res)
Ejemplo n.º 2
0
    def test_get_symbol_id_acc_shared2_m13_ns10_returns_5(self):
        res = get_symbol_id(model_symbol_id=13,
                            n_symbols=10,
                            accents_use_own_symbols=True,
                            shared_symbol_count=2)

        self.assertEqual(5, res)
Ejemplo n.º 3
0
    def test_get_symbol_id_acc_shared2_m6_ns6_returns_0(self):
        res = get_symbol_id(model_symbol_id=6,
                            n_symbols=6,
                            accents_use_own_symbols=True,
                            shared_symbol_count=2)

        self.assertEqual(2, res)
Ejemplo n.º 4
0
    def test_get_symbol_id_acc_shared0_m4_ns2_returns_0(self):
        res = get_symbol_id(model_symbol_id=4,
                            n_symbols=2,
                            accents_use_own_symbols=True,
                            shared_symbol_count=0)

        self.assertEqual(0, res)
Ejemplo n.º 5
0
    def test_get_symbol_id_acc_shared1_m2_ns2_returns_1(self):
        res = get_symbol_id(model_symbol_id=2,
                            n_symbols=2,
                            accents_use_own_symbols=True,
                            shared_symbol_count=1)

        self.assertEqual(1, res)
Ejemplo n.º 6
0
    def test_get_symbol_id_acc_shared1_m3_ns3_returns_1(self):
        res = get_symbol_id(
            model_symbol_id=3,  # is accent 1
            n_symbols=3,
            accents_use_own_symbols=True,
            shared_symbol_count=1)

        self.assertEqual(1, res)