python3Packages.androguard: drop nose dependency

This commit is contained in:
Emily 2024-07-28 00:02:15 +01:00
parent 5612d94418
commit 5b2c9211a3
2 changed files with 24 additions and 14 deletions

View File

@ -15,8 +15,7 @@
ipython,
pyqt5,
pyperclip,
nose,
nose-timer,
pytestCheckHook,
mock,
python-magic,
codecov,
@ -25,11 +24,12 @@
# This is usually used as a library, and it'd be a shame to force the GUI
# libraries to the closure if GUI is not desired.
withGui ? false,
# Tests take a very long time, and currently fail, but next release' tests
# shouldn't fail
doCheck ? false,
# Deprecated in 24.11.
doCheck ? true,
}:
assert lib.warnIf (!doCheck) "python3Packages.androguard: doCheck is deprecated" true;
buildPythonPackage rec {
pname = "androguard";
version = "3.4.0a1";
@ -42,7 +42,10 @@ buildPythonPackage rec {
sha256 = "1aparxiq11y0hbvkayp92w684nyxyyx7mi0n1x6x51g5z6c58vmy";
};
patches = [ ./drop-removed-networkx-formats.patch ];
patches = [
./drop-removed-networkx-formats.patch
./fix-tests.patch
];
build-system = [ setuptools ];
@ -69,23 +72,17 @@ buildPythonPackage rec {
];
nativeCheckInputs = [
pytestCheckHook
codecov
coverage
mock
nose
nose-timer
pyperclip
pyqt5
python-magic
];
inherit doCheck;
# If it won't be verbose, you'll see nothing going on for a long time.
checkPhase = ''
runHook preCheck
nosetests --verbosity=3
runHook postCheck
'';
pytestFlagsArray = [ "--verbose" ];
preFixup = lib.optionalString withGui ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")

View File

@ -0,0 +1,13 @@
diff --git a/tests/test_types.py b/tests/test_types.py
index 127dfc20eb..f1c89f0712 100644
--- a/tests/test_types.py
+++ b/tests/test_types.py
@@ -182,7 +182,7 @@
for i in filter(lambda x: 'const' in x.get_name(), method.get_instructions()):
i.show(0)
# ins should only have one literal
- self.assertEquals(len(i.get_literals()), 1)
+ self.assertEqual(len(i.get_literals()), 1)
fmt, value = VALUES[method.full_name].pop(0)
converted = format_value(i.get_literals()[0], i, fmt)