mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
Merge pull request #138221 from dotlambda/green-fix
This commit is contained in:
commit
27a0b5aa3e
@ -1,9 +1,11 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, isPy3k
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, isPy3k
|
||||
, fetchPypi
|
||||
, colorama
|
||||
, coverage
|
||||
, termstyle
|
||||
, lxml
|
||||
, unidecode
|
||||
, lxml
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@ -17,13 +19,22 @@ buildPythonPackage rec {
|
||||
sha256 = "a4d86f2dfa4ccbc86f24bcb9c9ab8bf34219c876c24e9f0603aab4dfe73bb575";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./tests.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace green/test/test_integration.py \
|
||||
--subst-var-by green "$out/bin/green"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
colorama coverage termstyle unidecode lxml
|
||||
colorama coverage unidecode lxml
|
||||
];
|
||||
|
||||
# let green run it's own test suite
|
||||
checkPhase = ''
|
||||
$out/bin/green green
|
||||
$out/bin/green -tvvv green
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
22
pkgs/development/python-modules/green/tests.patch
Normal file
22
pkgs/development/python-modules/green/tests.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git a/green/test/test_integration.py b/green/test/test_integration.py
|
||||
index 0cf8cbb..40d9f6b 100644
|
||||
--- a/green/test/test_integration.py
|
||||
+++ b/green/test/test_integration.py
|
||||
@@ -41,9 +41,7 @@ class TestFinalizer(unittest.TestCase):
|
||||
)
|
||||
fh.close()
|
||||
args = [
|
||||
- sys.executable,
|
||||
- "-m",
|
||||
- "green.cmdline",
|
||||
+ "@green@",
|
||||
"--finalizer=test_finalizer0.msg",
|
||||
"--maxtasksperchild=1",
|
||||
]
|
||||
@@ -58,6 +56,5 @@ class TestFinalizer(unittest.TestCase):
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
env=env,
|
||||
- timeout=10,
|
||||
).stdout.decode("utf-8")
|
||||
self.assertIn("finalizer worked", output)
|
Loading…
Reference in New Issue
Block a user