Skip to content
Snippets Groups Projects
  • Stephan Seitz's avatar
    Remove main methods from tests · 9089cc44
    Stephan Seitz authored
    ... or code will be executed when pytest is collecting the tests.
    I found out that I can use "-s" to convince vim-test to show me test
    output.
    9089cc44
test_print_unsupported_node.py 513 B
# -*- coding: utf-8 -*-
#
# Copyright © 2019 Stephan Seitz <stephan.seitz@fau.de>
#
# Distributed under terms of the GPLv3 license.

"""

"""
import pytest

import pystencils
from pystencils.backends.cbackend import CBackend


class UnsupportedNode(pystencils.astnodes.Node):

    def __init__(self):
        super().__init__()


def test_print_unsupported_node():
    with pytest.raises(NotImplementedError, match='CBackend does not support node of type UnsupportedNode'):
        CBackend()(UnsupportedNode())