def test_process_catch_end_of_track(self):
        """processing mpg123 output finds @P 0 end of track marker
        """
        self.mock_out.readline.side_effect = ['@P 0']

        poll_mpg123(self.mock_out, self.mock_q)

        self.mock_q.put.assert_called_once_with('@P 0')
    def test_process_ignore_frame(self):
        """Processing the output from mpg123 ignores @F lines
        """
        self.mock_out.readline.side_effect = [
            '@F 12320 502 321.83 13.11',
            '@F 12321 501 321.85 13.09',
            '@F 12322 500 321.88 13.06',
            '@P 0',
            '@F 12323 499 321.91 13.04',
            '@F 12324 498 321.93 13.01',
        ]

        poll_mpg123(self.mock_out, self.mock_q)

        self.mock_q.put.assert_called_once_with('@P 0')
    def test_process_ignore_no_data(self):
        """processing mpg123 output ignores coreaudio warning about no data
        """
        self.mock_out.readline.side_effect = [
            '@F 12320 502 321.83 13.11',
            '@F 12321 501 321.85 13.09',
            '@F 12322 500 321.88 13.06',
            '@P 0',
            "[coreaudio.c:81] warning: Didn't have any audio data in callback"
            "(buffer underflow)",
            "[coreaudio.c:81] warning: Didn't have any audio data in callback"
            "(buffer underflow)"
        ]

        poll_mpg123(self.mock_out, self.mock_q)

        self.mock_q.put.assert_called_once_with('@P 0')