def each_env_var(self, env_var: str):
        """Test setting priority via env var NUMBA_THREADING_LAYER_PRIORITY.
        """
        env = os.environ.copy()
        env['NUMBA_THREADING_LAYER'] = 'default'
        env['NUMBA_THREADING_LAYER_PRIORITY'] = env_var

        code = f"""
                import numba

                # trigger threading layer decision
                # hence catching invalid THREADING_LAYER_PRIORITY
                @numba.jit(
                    'float64[::1](float64[::1], float64[::1])',
                    nopython=True,
                    parallel=True,
                )
                def plus(x, y):
                    return x + y

                captured_envvar = list("{env_var}".split())
                assert numba.config.THREADING_LAYER_PRIORITY == \
                    captured_envvar, "priority mismatch"
                assert numba.threading_layer() == captured_envvar[0],\
                    "selected backend mismatch"
                """
        cmd = [
            sys.executable,
            '-c',
            textwrap.dedent(code),
        ]
        self.run_cmd(cmd, env=env)
Test setting priority via env var NUMBA_THREADING_LAYER_PRIORITY.
        
numba/tests/test_parallel_backend.py