Loading tests/core/test_custom_logging_code.py 0 → 100644 +0 −0 Empty file added. tests/test_persistent_data.py→tests/core/test_persistent_data.py +0 −0 File moved. View file tests/test_return_store_memaddr.py→tests/core/test_return_store_memaddr.py +0 −0 File moved. View file tests/test_run_system.py→tests/core/test_run_system.py +0 −0 File moved. View file tests/extra_tests.py 0 → 100644 +36 −0 Original line number Diff line number Diff line import subprocess import os # Script containing extra tests # TODO: store the version somewhere def test_binary_c_installed(): binary_c_dir = os.getenv("BINARY_C", None) assert binary_c_dir is not None, "Error: the BINARY_C environment variable is not set." assert os.path.isfile(os.path.join(binary_c_dir, 'binary_c')), "binary_c doesn't exist!" def test_binary_c_version(): required_binary_c_versions = ['2.1.7'] binary_c_dir = os.getenv("BINARY_C", None) binary_c_config = os.path.join(binary_c_dir, "binary_c-config") installed_binary_c_version = ( subprocess.run( [binary_c_config, "version"], stdout=subprocess.PIPE, check=True ) .stdout.decode("utf-8") .split() )[0] message = """ The binary_c version that is installed ({}) does not match the binary_c versions ({}) that this release of the binary_c python module requires. """.format(installed_binary_c_version, required_binary_c_versions) assert installed_binary_c_version in required_binary_c_versions, message ### if __name__ == "__main__": test_binary_c_version() test_binary_c_installed() No newline at end of file Loading
tests/test_return_store_memaddr.py→tests/core/test_return_store_memaddr.py +0 −0 File moved. View file
tests/extra_tests.py 0 → 100644 +36 −0 Original line number Diff line number Diff line import subprocess import os # Script containing extra tests # TODO: store the version somewhere def test_binary_c_installed(): binary_c_dir = os.getenv("BINARY_C", None) assert binary_c_dir is not None, "Error: the BINARY_C environment variable is not set." assert os.path.isfile(os.path.join(binary_c_dir, 'binary_c')), "binary_c doesn't exist!" def test_binary_c_version(): required_binary_c_versions = ['2.1.7'] binary_c_dir = os.getenv("BINARY_C", None) binary_c_config = os.path.join(binary_c_dir, "binary_c-config") installed_binary_c_version = ( subprocess.run( [binary_c_config, "version"], stdout=subprocess.PIPE, check=True ) .stdout.decode("utf-8") .split() )[0] message = """ The binary_c version that is installed ({}) does not match the binary_c versions ({}) that this release of the binary_c python module requires. """.format(installed_binary_c_version, required_binary_c_versions) assert installed_binary_c_version in required_binary_c_versions, message ### if __name__ == "__main__": test_binary_c_version() test_binary_c_installed() No newline at end of file