示例#1
0
 def test_0020(_):
     r1 = Rdng(_freq=[_.ichi1])
     k1 = Kanj(_freq=[_.ichi1])
     d = {(r1, k1, _.ichi1.kw, _.ichi1.value): _.ichi1}
     jdb.del_superfluous_freqs(d)
     # The ichi1 should remain on both r1 and k1.
     assertFreqOnLists(_, _.ichi1, r1, k1, 1, 1)
示例#2
0
 def test_0050(_):
     r1 = Rdng(_freq=[])
     k1 = Kanj(_freq=[_.ichi2a])
     d = {(None, k1, _.ichi2a.kw, _.ichi2a.value): _.ichi2a}
     jdb.del_superfluous_freqs(d)
     # The ichi2a should remain on k1.
     assertFreqOnLists(_, _.ichi2a, k1, None, 1)
示例#3
0
 def test_0060(_):
     r1 = Rdng(_freq=[_.ichi2])
     k1 = Kanj(_freq=[_.ichi2a, _.ichi2])
     d = {
         (None, k1, _.ichi2a.kw, _.ichi2a.value): _.ichi2a,
         (r1, k1, _.ichi2.kw, _.ichi2.value): _.ichi2,
     }
     jdb.del_superfluous_freqs(d)
     # The ichi2a should have been removed from k1.
     assertFreqOnLists(_, _.ichi2, r1, k1, 1, 1)
示例#4
0
 def test_0080(_):
     r1 = Rdng(_freq=[_.ichi2])
     k1 = Kanj(_freq=[_.ichi1, _.ichi2])
     d = {
         (None, k1, _.ichi1.kw, _.ichi1.value): _.ichi1,
         (r1, k1, _.ichi2.kw, _.ichi2.value): _.ichi2,
     }
     jdb.del_superfluous_freqs(d)
     # Both freqs should remain because they have different values.
     assertFreqOnLists(_, _.ichi2, r1, k1, 1, 2)
     assertFreqOnLists(_, _.ichi1, k1)
示例#5
0
 def test_0010(_):
     # Can we call it without a crash?
     jdb.del_superfluous_freqs({})