Skip to content

Commit

Permalink
add test that chia is installed when in ci (#17223)
Browse files Browse the repository at this point in the history
* add test that chia is installed when in ci

* Update test_installed.py
  • Loading branch information
altendky authored Jan 23, 2024
1 parent 68e2afa commit 61055ed
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/util/test_installed.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from __future__ import annotations

import os
import pathlib

import pytest

import chia


@pytest.mark.skipif(condition=os.environ.get("CI") is None, reason="Skip outside CI")
def test_chia_installed() -> None:
"""This checks that the in-memory chia package was loaded from an installed copy
and not the not-installed source code. This is relevant because it makes our
tests exercise the code and support files from our wheel which can differ from
the source. We have missed some source files and also some data files in the past
and testing the installed code checks for that. A next step would be to install
using the actual wheel file we are going to publish.
"""
assert "venv" in pathlib.Path(chia.__file__).parts

0 comments on commit 61055ed

Please sign in to comment.