Skip to content

Commit

Permalink
I think all the tests might pass this time.
Browse files Browse the repository at this point in the history
  • Loading branch information
TaylorSMarks committed Jul 23, 2021
1 parent f2863a4 commit b344246
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ def mockMciSendStringW(command, buf, bufLen, bufStart):
decodeCommand = command.decode('utf-16')

# Error code 305 ("Cannot specify extra characters after a string enclosed in quotation marks.") should never be tolerated.

if decodeCommand.startswith(u'open '):
testCase.assertIn(originalMCISendStringW(command, buf, bufLen, bufStart), [0, 306]) # 306 indicates drivers are missing. It's fine.
return 0

if decodeCommand.startswith(u'close '):
global sawClose
Expand All @@ -58,11 +54,10 @@ def mockMciSendStringW(command, buf, bufLen, bufStart):

if decodeCommand.endswith(u' wait'):
sleep(expectedDuration)

if decodeCommand.startswith(u'play '):
return originalMCISendStringW(command, buf, bufLen, bufStart)
#testCase.assertEqual(originalMCISendStringW(command, buf, bufLen, bufStart), 0)
#return 0

if decodeCommand.startswith(u'open ') or decodeCommand.startswith(u'play '):
testCase.assertIn(originalMCISendStringW(command, buf, bufLen, bufStart), [0, 306]) # 306 indicates drivers are missing. It's fine.
return 0

class PlaysoundTests(unittest.TestCase):
def helper(self, file, approximateDuration, block = True):
Expand Down

0 comments on commit b344246

Please sign in to comment.