File: conftest.py

package info (click to toggle)
sasview 6.1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 152,244 kB
  • sloc: python: 58,639; cpp: 6,412; javascript: 173; makefile: 167; sh: 67; xml: 40
file content (17 lines) | stat: -rw-r--r-- 553 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import os
import platform

import pytest

# We are assuming that the tests are running in a virtual environment with
# sasview, sasmodels and sasdata already installed, perhaps in dev mode
# using "pip install -e".
from sas.system import config

config.override_with_defaults()

@pytest.fixture(scope="session", autouse=True)
def set_env():
    # pytest and numba do not play nicely together on windows, see: https://github.com/numba/numba/issues/8223#issuecomment-1175213066
    if platform.system() == "Windows":
        os.environ["SAS_NUMBA"] = "0"