Browse Source

comment out debugging, fix up renaming..

main
John-Mark Gurney 7 years ago
parent
commit
c1fe2a2917
1 changed files with 4 additions and 6 deletions
  1. +4
    -6
      yadenon.py

+ 4
- 6
yadenon.py View File

@@ -207,7 +207,6 @@ class DenonAVR(object):
if timo is not None: if timo is not None:
self._ser.timeout = oldtimo self._ser.timeout = oldtimo


print 'rc:', `cmd`
return cmd return cmd


def process_events(self, till=None): def process_events(self, till=None):
@@ -215,7 +214,6 @@ class DenonAVR(object):
process a single event.''' process a single event.'''


assert till is None or len(till) == 2 assert till is None or len(till) == 2
print 'till:', `till`
while True: while True:
event = self._readcmd() event = self._readcmd()


@@ -324,10 +322,10 @@ class TestMethods(unittest.TestCase):


avr._ser.read.assert_has_calls([ mock.call(), mock.call() ]) avr._ser.read.assert_has_calls([ mock.call(), mock.call() ])


@mock.patch('denon.DenonAVR._sendcmd')
@mock.patch('denon.DenonAVR.process_events')
@mock.patch('yadenon.DenonAVR._sendcmd')
@mock.patch('yadenon.DenonAVR.process_events')
@mock.patch('time.sleep') @mock.patch('time.sleep')
@mock.patch('denon.DenonAVR.update')
@mock.patch('yadenon.DenonAVR.update')
def test_proc_PW(self, mupdate, msleep, mpevents, msendcmd): def test_proc_PW(self, mupdate, msleep, mpevents, msendcmd):
avr = self.avr avr = self.avr


@@ -387,7 +385,7 @@ class TestMethods(unittest.TestCase):


self.assertRaises(RuntimeError, avr.proc_ZM, 'foobar') self.assertRaises(RuntimeError, avr.proc_ZM, 'foobar')


@mock.patch('denon.DenonAVR.process_events')
@mock.patch('yadenon.DenonAVR.process_events')
def test_proc_MV(self, pe): def test_proc_MV(self, pe):
avr = self.avr avr = self.avr




Loading…
Cancel
Save