def test_complex_single_line_expression(self):
    snippet = "a - b @ (c * x['key'] + 23)"
    (compiled_code, _) = self.check_positions_against_ast(snippet)
    self.assertOpcodeSourcePositionIs(compiled_code, 'BINARY_SUBSCR', line=1, end_line=1, column=13, end_column=21)
    self.assertOpcodeSourcePositionIs(compiled_code, 'BINARY_OP', line=1, end_line=1, column=9, end_column=21, occurrence=1)
    self.assertOpcodeSourcePositionIs(compiled_code, 'BINARY_OP', line=1, end_line=1, column=9, end_column=26, occurrence=2)
    self.assertOpcodeSourcePositionIs(compiled_code, 'BINARY_OP', line=1, end_line=1, column=4, end_column=27, occurrence=3)
    self.assertOpcodeSourcePositionIs(compiled_code, 'BINARY_OP', line=1, end_line=1, column=0, end_column=27, occurrence=4)
def test_complex_single_line_expression(self):
    snippet = "a - b @ (c * x['key'] + 23)"
    (compiled_code, _) = self.check_positions_against_ast(snippet)
    self.assertOpcodeSourcePositionIs(compiled_code, 'BINARY_SUBSCR', line=1, end_line=1, column=13, end_column=21)
    self.assertOpcodeSourcePositionIs(compiled_code, 'BINARY_OP', line=1, end_line=1, column=9, end_column=21, occurrence=1)
    self.assertOpcodeSourcePositionIs(compiled_code, 'BINARY_OP', line=1, end_line=1, column=9, end_column=26, occurrence=2)
    self.assertOpcodeSourcePositionIs(compiled_code, 'BINARY_OP', line=1, end_line=1, column=4, end_column=27, occurrence=3)
    self.assertOpcodeSourcePositionIs(compiled_code, 'BINARY_OP', line=1, end_line=1, column=0, end_column=27, occurrence=4)