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-27 14:41:22 +01:00
Code Issues Packages Projects Releases Wiki Activity
Files
acd35a55c849ea0de8ffac164801cc75f286a7bd
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
Header updates Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-11-03 12:21:36 +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: 290ms 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