Usage#

To use micromagnetictests, in the specific calculator package, inside the tests directory import the tests you want to use. For instance:

[1]:
from micromagnetictests.calculatortests import TestDMI, TestExchange

On the other hand, all tests can be imported as:

[2]:
from micromagnetictests.calculatortests import *

After this, create conftest.py file, where a fixture for a calculator is set. For instance:

[3]:
# The content of this should be in conftest.py

import pytest

# Here import your calculator


@pytest.fixture(scope="module")
def calculator():
    pass
    # return imported calculator