forked from numenta/nupic.core-legacy
-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathhtm_test.py
More file actions
43 lines (37 loc) · 2.14 KB
/
htm_test.py
File metadata and controls
43 lines (37 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# ----------------------------------------------------------------------
# HTM Community Edition of NuPIC
# Copyright (C) 2013-2024, Numenta, Inc.
# Migrated to scikit-build-core: David Keeney, dkeeney@gmail.com, Dec 2024
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU Affero Public License (http://www.gnu.org/licenses) for more details.
#
# You should have received a copy of the GNU Affero Public License
# along with this program.
# ----------------------------------------------------------------------
"""
NOTE: After build system migration there were three test that failed.
These did not look like they were related to the build system so
they were skipped. These should be investiated.
David Keeney, dkeeney@gmail.com, 1/20/2025
=============================================== short test summary info ===============================================
FAILED py/tests/advanced/algorithms/apical_tiebreak_temporal_memory/attm_sequence_memory_test.py::ApicalTiebreakTM_SequenceMemoryTests::testH4 - AssertionError: Items in the first set but not the second:
FAILED py/tests/advanced/frameworks/location/location_network_creation_test.py::LocationNetworkFactoryTest::testCreateL4L6aLocationColumn - json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)
FAILED py/tests/advanced/regions/location_region_test.py::GridCellLocationRegionTest::testLearning - json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)
"""
import subprocess
import sys
# Run the C++ unit tests
print(" ==== C++ unit tests ===== ")
subprocess.run(['build/Release/bin/unit_tests'], check=True)
# Run all Python unit tests
print("")
print(" ===== Python unit tests =====")
subprocess.run([sys.executable, "-m", "pytest", "-s", "py/tests", "bindings/py/tests"], check=True)
print('Unit tests completed.')