Example #1
0
 def test_find_random_localized(self):
     task = self.loop.create_task(
         Resources.find("sounds", "nabclockd/0/*.mp3"))
     path = self.loop.run_until_complete(task)
     self.assertNotEqual(path, None)
     task = self.loop.create_task(
         Resources.find("sounds", "nabsurprised/*.mp3"))
     path = self.loop.run_until_complete(task)
     self.assertNotEqual(path, None)
Example #2
0
 def test_find_localized_non_existing(self):
     config = Config()
     config.locale = "tlh_TLH"
     config.save()
     task = self.loop.create_task(
         Resources.find("sounds", "nabclockd/0/1.mp3"))
     path = self.loop.run_until_complete(task)
     self.assertEqual(path, None)
Example #3
0
 def test_find_existing(self):
     path = Resources.find('choreographies', 'nabtaichid/taichi.chor')
     self.assertTrue(len(path.read_bytes()) > 1024)
Example #4
0
 def test_find_midi_list(self):
     for midi in ChoreographyInterpreter.MIDI_LIST:
         path = Resources.find('sounds', midi)
         self.assertNotEqual(path, None)
Example #5
0
 def test_find_random_not_localized(self):
     path = Resources.find('sounds', 'nabsurprised/respirations/*.mp3')
     print(path)
     self.assertNotEqual(path, None)
Example #6
0
 def test_find_random_localized(self):
     path = Resources.find('sounds', 'nabclockd/0/*.mp3')
     self.assertNotEqual(path, None)
     path = Resources.find('sounds', 'nabsurprised/*.mp3')
     self.assertNotEqual(path, None)
Example #7
0
 def test_find_localized_non_existing(self):
     config = Config()
     config.locale = 'tlh_TLH'
     path = Resources.find('sounds', 'nabclockd/0/1.mp3')
     self.assertEqual(None, None)
Example #8
0
 def test_find_localized(self):
     path = Resources.find('sounds', 'nabclockd/0/1.mp3')
     print(path)
     self.assertNotEqual(path, None)
Example #9
0
 def test_find_not_existing(self):
     path = Resources.find('choreographies', 'xy/zp.chor')
     self.assertEqual(path, None)
Example #10
0
 def test_find_midi_list(self):
     for midi in ChoreographyInterpreter.MIDI_LIST:
         task = self.loop.create_task(Resources.find("sounds", midi))
         path = self.loop.run_until_complete(task)
         self.assertNotEqual(path, None)
Example #11
0
 def test_find_not_existing(self):
     task = self.loop.create_task(
         Resources.find("choreographies", "xy/zp.chor")
     )
     path = self.loop.run_until_complete(task)
     self.assertEqual(path, None)
Example #12
0
 def test_find_existing(self):
     task = self.loop.create_task(
         Resources.find("choreographies", "nabtaichid/taichi.chor")
     )
     path = self.loop.run_until_complete(task)
     self.assertTrue(len(path.read_bytes()) > 1024)