Unverified Commit b9fb14cc authored by Emily's avatar Emily Committed by GitHub
Browse files

Merge pull request #330396 from Sigmanificient/blockdiag

python312Packages.{blackdiag,seqdiag,actdiag,nwdiag}: drop nose dependency
parents ff8359ab ac2e5fbd
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@
  blockdiag,
  buildPythonPackage,
  fetchFromGitHub,
  nose,
  pytestCheckHook,
  pythonOlder,
  setuptools,
@@ -23,17 +22,13 @@ buildPythonPackage rec {
    hash = "sha256-WmprkHOgvlsOIg8H77P7fzEqxGnj6xaL7Df7urRkg3o=";
  };

  patches = [ ./fix_test_generate.patch ];

  build-system = [ setuptools ];

  propagatedBuildInputs = [ blockdiag ];

  # tests rely on nose
  doCheck = pythonOlder "3.12";

  nativeCheckInputs = [
    nose
    pytestCheckHook
  ];
  nativeCheckInputs = [ pytestCheckHook ];

  pytestFlagsArray = [ "src/actdiag/tests/" ];

+22 −0
Original line number Diff line number Diff line
diff --git a/src/actdiag/tests/test_generate_diagram.py b/src/actdiag/tests/test_generate_diagram.py
index c5ee3d5..a74a151 100644
--- a/src/actdiag/tests/test_generate_diagram.py
+++ b/src/actdiag/tests/test_generate_diagram.py
@@ -16,16 +16,6 @@
 import os
 
 from blockdiag.tests.test_generate_diagram import (get_diagram_files,
-                                                   testcase_generator)
+                                                   test_generate_with_separate)
 
-import actdiag.command
 
-
-def test_generate():
-    mainfunc = actdiag.command.main
-    basepath = os.path.dirname(__file__)
-    files = get_diagram_files(basepath)
-    options = []
-
-    for testcase in testcase_generator(basepath, mainfunc, files, options):
-        yield testcase
+14 −5
Original line number Diff line number Diff line
@@ -5,9 +5,9 @@
  ephem,
  fetchFromGitHub,
  fetchpatch,
  fetchpatch2,
  funcparserlib,
  pillow,
  nose,
  pytestCheckHook,
  pythonOlder,
  reportlab,
@@ -36,8 +36,21 @@ buildPythonPackage rec {
      url = "https://github.com/blockdiag/blockdiag/commit/20d780cad84e7b010066cb55f848477957870165.patch";
      hash = "sha256-t1zWFzAsLL2EUa0nD4Eui4Y5AhAZLRmp/yC9QpzzeUA=";
    })
    # https://github.com/blockdiag/blockdiag/pull/175
    (fetchpatch2 {
      name = "migrate-to-pytest.patch";
      url = "https://github.com/blockdiag/blockdiag/commit/4f4f726252084f17ecc6c524592222af09d37da4.patch";
      hash = "sha256-OkfKJwJtb2DJRXE/8thYnisTFwcfstUFTTJHdM/qBzg=";
    })
  ];

  postPatch = ''
    # requires network access the url-based icon
    # and path-based icon is set to debian logo (/usr/share/pixmaps/debian-logo.png)
    rm src/blockdiag/tests/diagrams/node_icon.diag
    # note: this is a postPatch as `seqdiag` uses them directly
  '';

  build-system = [ setuptools ];

  dependencies = [
@@ -48,12 +61,8 @@ buildPythonPackage rec {
    webcolors
  ];

  # tests rely on nose
  doCheck = pythonOlder "3.12";

  nativeCheckInputs = [
    ephem
    nose
    pytestCheckHook
  ];

+3 −8
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@
  blockdiag,
  fetchFromGitHub,
  buildPythonPackage,
  nose,
  pytestCheckHook,
  setuptools,
  pythonOlder,
@@ -23,17 +22,13 @@ buildPythonPackage rec {
    hash = "sha256-uKrdkXpL5YBr953sRsHknYg+2/WwrZmyDf8BMA2+0tU=";
  };

  patches = [ ./fix_test_generate.patch ];

  build-system = [ setuptools ];

  dependencies = [ blockdiag ];

  # tests rely on nose
  doCheck = pythonOlder "3.12";

  nativeCheckInputs = [
    nose
    pytestCheckHook
  ];
  nativeCheckInputs = [ pytestCheckHook ];

  pytestFlagsArray = [ "src/nwdiag/tests/" ];

+22 −0
Original line number Diff line number Diff line
diff --git a/src/nwdiag/tests/test_generate_diagram.py b/src/nwdiag/tests/test_generate_diagram.py
index 2065208..ac9b096 100644
--- a/src/nwdiag/tests/test_generate_diagram.py
+++ b/src/nwdiag/tests/test_generate_diagram.py
@@ -16,16 +16,4 @@
 import os
 
 from blockdiag.tests.test_generate_diagram import (get_diagram_files,
-                                                   testcase_generator)
-
-import nwdiag.command
-
-
-def test_generate():
-    mainfunc = nwdiag.command.main
-    basepath = os.path.dirname(__file__)
-    files = get_diagram_files(basepath)
-    options = []
-
-    for testcase in testcase_generator(basepath, mainfunc, files, options):
-        yield testcase
+                                                   test_generate_with_separate)
Loading