Exercise 18 advanced

Hello,

I’m trying to solve this task. It really drives me crazy.

That is what I get finally. But I’ve tried a lot of different texts. Even a icelandish folk song worked well. Without knowing the problem or the text a which the code fails it is hart to find a solution. Has everyone solved this task without error message ?

Test Result

Test Failed: AssertionError: '[(0, 1), (1, 0)]' not found in ['(0, 1)', '(1, 0)']

The answer is not correct - Test cases: 1 / 2

  File "/usr/local/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
    yield
  File "/usr/local/lib/python3.8/unittest/case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "/usr/local/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
    method()
  File "/app/test/test_main.py", line 37, in test_answer_two
    self.assertIn(output, expected, "Your answer passed the first test case, but must work correctly with any data set.")
  File "/usr/local/lib/python3.8/unittest/case.py", line 1179, in assertIn
    self.fail(self._formatMessage(msg, standardMsg))
  File "/usr/local/lib/python3.8/unittest/case.py", line 753, in fail
    raise self.failureException(msg)


Error: '(0, 1)\n(1, 2)\n(1, 3)\n(2, 3)' not found in ['(2, 3)', '(3, 2)'] : Your answer passed the first test case, but must work correctly with any data set.