1 Star 0 Fork 1

like/python-pyaes

forked from src-openEuler/python-pyaes 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
python-pyaes-0001-Use-relative-imports-during-tests.patch 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
like 提交于 2021-07-07 11:39 . 添加python-pyaes-1.6.1-1
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Fri, 31 Mar 2017 17:49:01 +0300
Subject: [PATCH] Use relative imports during tests
Sometimes you're testing package not from ~/Projects/pyaes or something,
but from ~/Projects/python-pyaes. Let's allow people to rename a
project's top-level directory.
Also let's allow run tests from ./tests/ as well.
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
diff --git a/tests/test-aes.py b/tests/test-aes.py
index afa59aa..35d0a4f 100644
--- a/tests/test-aes.py
+++ b/tests/test-aes.py
@@ -22,7 +22,8 @@
import sys
-sys.path.append('../pyaes')
+sys.path.append('./')
+sys.path.append('../')
from pyaes import *
diff --git a/tests/test-blockfeeder.py b/tests/test-blockfeeder.py
index 41bd487..9781253 100644
--- a/tests/test-blockfeeder.py
+++ b/tests/test-blockfeeder.py
@@ -22,7 +22,8 @@
import sys
-sys.path.append('../pyaes')
+sys.path.append('./')
+sys.path.append('../')
import os
import random
diff --git a/tests/test-util.py b/tests/test-util.py
index db30918..3b1ae7e 100644
--- a/tests/test-util.py
+++ b/tests/test-util.py
@@ -22,7 +22,8 @@
import sys
-sys.path.append('../pyaes')
+sys.path.append('./')
+sys.path.append('../')
from pyaes.util import append_PKCS7_padding, strip_PKCS7_padding
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/pangzihapipangzi/python-pyaes.git
git@gitee.com:pangzihapipangzi/python-pyaes.git
pangzihapipangzi
python-pyaes
python-pyaes
master

搜索帮助