File: __init__.py

package info (click to toggle)
python-ase 3.21.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,936 kB
  • sloc: python: 122,428; xml: 946; makefile: 111; javascript: 47
file content (24 lines) | stat: -rw-r--r-- 545 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import pytest
import os


def installed():
    for env in ['VASP_COMMAND', 'VASP_SCRIPT']:
        if os.getenv(env):
            break
    else:
        pytest.skip('Neither VASP_COMMAND nor VASP_SCRIPT defined')
    return True


def installed2():
    # Check if env variables exist for Vasp2

    for env in ['VASP_COMMAND', 'VASP_SCRIPT', 'ASE_VASP_COMMAND']:
        if os.getenv(env):
            break
    else:
        pytest.skip('Neither ASE_VASP_COMMAND, VASP_COMMAND nor '
                    'VASP_SCRIPT defined')

    return True