File: test_constants.py

package info (click to toggle)
scikit-build 0.18.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,792 kB
  • sloc: python: 5,258; cpp: 284; makefile: 171; f90: 12; sh: 7
file content (15 lines) | stat: -rw-r--r-- 448 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from __future__ import annotations

import os
import sys

from skbuild.constants import SKBUILD_DIR, set_skbuild_plat_name, skbuild_plat_name


def test_set_skbuild_plat_name():
    try:
        previous_plat_name = skbuild_plat_name()
        set_skbuild_plat_name("plat-name")
        assert os.path.join("_skbuild", "plat-name-{}.{}".format(*sys.version_info[:2])) == SKBUILD_DIR()
    finally:
        set_skbuild_plat_name(previous_plat_name)