Exemple #1
0
 def test_last_tail1(self):
     s = _State()
     s.translations = [self.a]
     s.tail = self.b
     self.assertEqual(s.last(), self.a)
Exemple #2
0
 def test_last_list0(self):
     s = _State()
     self.assertIsNone(s.last())
Exemple #3
0
 def test_last_list2(self):
     s = _State()
     s.translations = [self.a, self.b]
     self.assertEqual(s.last(), self.b)
Exemple #4
0
 def test_restrict_size_multiple_translations(self):
     s = _State()
     s.translations = [self.a, self.b, self.c]
     s.restrict_size(5)
     self.assertEquals(s.translations, [self.b, self.c])
     self.assertEqual(s.tail, self.a)
Exemple #5
0
 def setUp(self):
     self.d = StenoDictionary()
     self.s = _State()
     self.o = type(self).CaptureOutput()
Exemple #6
0
 def test_restrict_size_zero_on_one_stroke(self):
     s = _State()
     s.translations = [self.a]
     s.restrict_size(0)
     self.assertEquals(s.translations, [self.a])
     self.assertIsNone(s.tail)
Exemple #7
0
 def test_restrict_size_to_one_on_two_strokes(self):
     s = _State()
     s.translations = [self.b]
     s.restrict_size(1)
     self.assertEquals(s.translations, [self.b])
     self.assertIsNone(s.tail)
Exemple #8
0
 def test_restrict_size_zero_on_one_stroke(self):
     s = _State()
     s.translations = [self.a]
     s.restrict_size(0)
     self.assertEquals(s.translations, [self.a])
     self.assertIsNone(s.tail)
Exemple #9
0
 def test_restrict_size_to_exactly_one_stroke(self):
     s = _State()
     s.translations = [self.a]
     s.restrict_size(1)
     self.assertEquals(s.translations, [self.a])
     self.assertIsNone(s.tail)
Exemple #10
0
 def test_last_tail0(self):
     s = _State()
     s.tail = self.b
     self.assertEqual(s.last(), self.b)
Exemple #11
0
 def test_restrict_size_zero_on_empty(self):
     s = _State()
     s.restrict_size(0)
     self.assertEquals(s.translations, [])
     self.assertIsNone(s.tail)
Exemple #12
0
 def test_last_tail1(self):
     s = _State()
     s.translations = [self.a]
     s.tail = self.b
     self.assertEqual(s.last(), self.a)
Exemple #13
0
 def test_last_list2(self):
     s = _State()
     s.translations = [self.a, self.b]
     self.assertEqual(s.last(), self.b)        
Exemple #14
0
 def test_last_list0(self):
     s = _State()
     self.assertIsNone(s.last())    
Exemple #15
0
 def test_last_tail0(self):
     s = _State()
     s.tail = self.b
     self.assertEqual(s.last(), self.b)
Exemple #16
0
 def test_restrict_size_to_one_on_two_strokes(self):
     s = _State()
     s.translations = [self.b]
     s.restrict_size(1)
     self.assertEquals(s.translations, [self.b])
     self.assertIsNone(s.tail)
Exemple #17
0
 def test_restrict_size_zero_on_empty(self):
     s = _State()
     s.restrict_size(0)
     self.assertEquals(s.translations, [])
     self.assertIsNone(s.tail)
Exemple #18
0
 def test_restrict_size_to_one_on_two_translations_too_big(self):
     s = _State()
     s.translations = [self.a, self.b]
     s.restrict_size(1)
     self.assertEquals(s.translations, [self.b])
     self.assertEqual(s.tail, self.a)
Exemple #19
0
 def test_restrict_size_to_exactly_one_stroke(self):
     s = _State()
     s.translations = [self.a]
     s.restrict_size(1)
     self.assertEquals(s.translations, [self.a])
     self.assertIsNone(s.tail)
Exemple #20
0
 def test_restrict_size_multiple_translations(self):
     s = _State()
     s.translations = [self.a, self.b, self.c]
     s.restrict_size(5)
     self.assertEquals(s.translations, [self.b, self.c])
     self.assertEqual(s.tail, self.a)
Exemple #21
0
 def test_restrict_size_to_one_on_two_translations_too_big(self):
     s = _State()
     s.translations = [self.a, self.b]
     s.restrict_size(1)
     self.assertEquals(s.translations, [self.b])
     self.assertEqual(s.tail, self.a)
Exemple #22
0
 def setUp(self):
     self.d = StenoDictionary()
     self.dc = StenoDictionaryCollection()
     self.dc.set_dicts([self.d])
     self.s = _State()
     self.o = type(self).CaptureOutput()
Exemple #23
0
 def setUp(self):
     self.d = StenoDictionary()
     self.s = _State()
     self.o = type(self).CaptureOutput()
 def setUp(self):
     self.d = StenoDictionary()
     self.dc = StenoDictionaryCollection()
     self.dc.set_dicts([self.d])
     self.s = _State()
     self.o = type(self).CaptureOutput()