File: test_issue707_tested_packages.py

package info (click to toggle)
scikit-build 0.18.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,768 kB
  • sloc: python: 5,259; cpp: 284; makefile: 171; f90: 12; sh: 7
file content (24 lines) | stat: -rw-r--r-- 637 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
from __future__ import annotations

from . import project_setup_py_test


def test_install_command(capfd, monkeypatch):
    @project_setup_py_test("issue-707-nested-packages", ["build_ext", "--inplace"], disable_languages_test=True)
    def build():
        pass

    build()
    capfd.readouterr()
    monkeypatch.syspath_prepend(build.tmp_dir)

    # Verify that both
    import hello_nested

    hello_nested.hello("World")
    captured = capfd.readouterr()
    assert captured.out == "Hello, World!\n"

    hello_nested.goodbye_nested.goodbye("World")
    captured = capfd.readouterr()
    assert captured.out == "Goodbye, World!\n"