Skip to content

Commit 2797de3

Browse files
committed
update version test
1 parent e003199 commit 2797de3

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/smellscapy/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
"""Smellscapy is a Python library for analysing and representing indoor smellscape perceptual data."""
22

33
import os
4+
from importlib.metadata import version, PackageNotFoundError
5+
6+
try:
7+
__version__ = version("smellscapy")
8+
except PackageNotFoundError:
9+
__version__ = None
410

511

612
from smellscapy import databases, plotting, data

tests/test_basic.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55

66

77

8+
9+
def test_smellscapy_import():
10+
assert smellscapy.__version__ is not None, "Missing Smellscapy version"
11+
12+
13+
814
def test_core_smellscapy_modules():
915
assert hasattr(smellscapy, "data"), "Missing data module in Smellscapy"
1016
assert hasattr(smellscapy, "databases"), "Missing databases module in Smellscapy"

0 commit comments

Comments
 (0)