From b438b68cb495e48f104e4f87ac28ef52c6e7b3cd Mon Sep 17 00:00:00 2001 From: lucasew Date: Sat, 26 Feb 2022 17:07:01 -0300 Subject: [PATCH] python3Packages.zcs: patch to fix the test Signed-off-by: lucasew --- pkgs/development/python-modules/zcs/default.nix | 4 ++++ .../python-modules/zcs/fix-test-yaml.patch | 13 +++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 pkgs/development/python-modules/zcs/fix-test-yaml.patch diff --git a/pkgs/development/python-modules/zcs/default.nix b/pkgs/development/python-modules/zcs/default.nix index 9f22cd1dfc86..8ad26668bc5e 100644 --- a/pkgs/development/python-modules/zcs/default.nix +++ b/pkgs/development/python-modules/zcs/default.nix @@ -15,6 +15,10 @@ buildPythonPackage rec { sha256 = "sha256-ZoQgAaJy3kKHLljyKA0Oo/D1kefE8X9FlsGDSNt1nPw="; }; + patches = [ + ./fix-test-yaml.patch + ]; + propagatedBuildInputs = [ yacs ]; pythonImportsCheck = [ "zcs" ]; diff --git a/pkgs/development/python-modules/zcs/fix-test-yaml.patch b/pkgs/development/python-modules/zcs/fix-test-yaml.patch new file mode 100644 index 000000000000..a046f1808296 --- /dev/null +++ b/pkgs/development/python-modules/zcs/fix-test-yaml.patch @@ -0,0 +1,13 @@ +diff --git a/test/test_zcs.py b/test/test_zcs.py +index e4981d3..893999f 100644 +--- a/test/test_zcs.py ++++ b/test/test_zcs.py +@@ -65,7 +65,7 @@ class TestCfgNode(unittest.TestCase): + cfg = self.cfg.clone() + yamlp = pathjoin(tmpboxx(), "test.yaml") + cfg.dump(yamlp) +- cfg_dict = yaml.load(open(yamlp)) ++ cfg_dict = yaml.load(open(yamlp), yaml.Loader) + cfgd = CfgNode(cfg_dict) + self.assertTrue(str(cfg.dump()) == str(cfgd.dump())) +