summaryrefslogtreecommitdiff
path: root/lib/spack/spack/test/cmd/python.py
blob: 074c295622fad673cbee99545db0918865cd501f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

import spack
from spack.main import SpackCommand

python = SpackCommand('python')


def test_python():
    out = python('-c', 'import spack; print(spack.spack_version)')
    assert out.strip() == spack.spack_version