Logo
Explore Help
Register Sign In
TeamHepta/mbedtls
1
0
Fork 0
You've already forked mbedtls
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2026-03-25 13:41:56 +01:00
Code Issues Packages Projects Releases Wiki Activity
Files
5b00fb111f8032f26c0f4e79d0f6507ef82daf87
mbedtls/tests/scripts/scripts_path.py

18 lines
412 B
Python
Raw Normal View History

Allow tests/scripts/foo.py to import from scripts Allow Python scripts in tests/scripts to import modules located in the scripts directory. To do this, use ``` import scripts_path # pylint: disable=unused-import ``` Declare the scripts directory to pylint and to mypy. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-12-10 23:11:59 +01:00
"""Add our Python library directory to the module search path.
Usage:
import scripts_path # pylint: disable=unused-import
"""
# Copyright The Mbed TLS Contributors
Update headers Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-03 12:04:52 +00:00
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
Allow tests/scripts/foo.py to import from scripts Allow Python scripts in tests/scripts to import modules located in the scripts directory. To do this, use ``` import scripts_path # pylint: disable=unused-import ``` Declare the scripts directory to pylint and to mypy. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2020-12-10 23:11:59 +01:00
#
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__),
os.path.pardir, os.path.pardir,
'scripts'))
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.3 Page: 122ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API