loki.ir.tests.test_pragma_utils

Functions

test_get_pragma_parameters(content, ...)

Test correct extraction of Loki pragma parameters.

test_get_pragma_parameters_multiline(frontend)

Test correct extraction of Loki pragma parameters from pragmas with line-contunation.

test_is_loki_pragma(keyword, content, ...)

Test correct identification of Loki pragmas.

test_long_pragmas(frontend)

Test correct dealing with long pragmas.

test_pragmas_map(frontend)

Test correct handling of pragmas with multiple occurences of same keyword.

test_pragmas_mixed_key_value_attrs(frontend)

Test correct handling of pragmas that contain attributes with and without values in parentheses (reported in #317).

test_tools_pragma_detach(frontend)

A short test that verifies that multiple pragmas are inlined and kept in the right order.

test_tools_pragma_inlining(frontend)

A short test that verifies pragmas that are the first statement in a routine's body are correctly identified and inlined.

test_tools_pragma_inlining_multiple(frontend)

A short test that verifies that multiple pragmas are inlined and kept in the right order.

test_tools_pragma_regions_attached(frontend)

Verify pragma_regions_attached creates and removes PragmaRegion objects.

test_tools_pragma_regions_attached_nested(...)

Verify pragma_regions_attached creates and removes PragmaRegion objects.

test_tools_pragmas_attached_example(frontend)

A short test that verifies that the example from the docstring works.

test_tools_pragmas_attached_loop(frontend)

A short test that verifies that the context manager to attach pragmas works as expected.

test_tools_pragmas_attached_module(frontend, ...)

Verify pragmas_attached works for Module objects.

test_tools_pragmas_attached_post(frontend)

Verify the inlining of pragma_post.

test_is_loki_pragma(keyword, content, starts_with, ref)

Test correct identification of Loki pragmas.

test_get_pragma_parameters(content, starts_with, ref)

Test correct extraction of Loki pragma parameters.

test_get_pragma_parameters_multiline(frontend)

Test correct extraction of Loki pragma parameters from pragmas with line-contunation.

test_tools_pragma_inlining(frontend)

A short test that verifies pragmas that are the first statement in a routine’s body are correctly identified and inlined.

test_tools_pragma_inlining_multiple(frontend)

A short test that verifies that multiple pragmas are inlined and kept in the right order.

test_tools_pragma_detach(frontend)

A short test that verifies that multiple pragmas are inlined and kept in the right order.

test_tools_pragmas_attached_loop(frontend)

A short test that verifies that the context manager to attach pragmas works as expected.

test_tools_pragmas_attached_example(frontend)

A short test that verifies that the example from the docstring works.

test_tools_pragmas_attached_post(frontend)

Verify the inlining of pragma_post.

test_tools_pragmas_attached_module(frontend, tmp_path)

Verify pragmas_attached works for Module objects.

test_tools_pragma_regions_attached(frontend)

Verify pragma_regions_attached creates and removes PragmaRegion objects.

test_tools_pragma_regions_attached_nested(frontend)

Verify pragma_regions_attached creates and removes PragmaRegion objects.

test_long_pragmas(frontend)

Test correct dealing with long pragmas.

test_pragmas_map(frontend)

Test correct handling of pragmas with multiple occurences of same keyword.

test_pragmas_mixed_key_value_attrs(frontend)

Test correct handling of pragmas that contain attributes with and without values in parentheses (reported in #317).