Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python311Packages.poetry has doctest failures #202732

Open
MatrixManAtYrService opened this issue Nov 24, 2022 · 1 comment
Open

python311Packages.poetry has doctest failures #202732

MatrixManAtYrService opened this issue Nov 24, 2022 · 1 comment

Comments

@MatrixManAtYrService
Copy link
Contributor

Describe the bug

I would like to use nix-shell to encapsulate a Python 3.11 environment with poetry installed (poetry will handle the other dependencies). So I wrote this shell.nix

{ pkgs ? import <nixpkgs> {} }:
  pkgs.mkShell {
    nativeBuildInputs = [ 
        pkgs.python311Packages.poetry
    ];
}

but nix-shell fails with this error:

Traceback (most recent call last):
  File "/nix/store/682li14hp6cpn5gcaj00n3mhzafk37lc-python3-3.11.0/lib/python3.11/doctest.py", line 2221, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for doctestcase.txt
  File "/build/zope.testing-4.10/src/zope/testing/doctestcase.txt", line 0

----------------------------------------------------------------------
File "/build/zope.testing-4.10/src/zope/testing/doctestcase.txt", line 89, in doctestcase.txt
Failed example:
    result = suite.run(unittest.TextTestResult(sys.stdout, True, 3))
Expected:
    test1 (tests.MyTest) ... ok
    test2 (tests.MyTest) ... ok
    test3 (tests.MyTest) ... ok
    test4 (tests.MyTest) ... ok
Got:
    test1 (tests.MyTest.test1) ... ok
    test2 (tests.MyTest.test2) ... ok
    test3 (tests.MyTest.test3) ... ok
    test4 (tests.MyTest.test4) ... ok
----------------------------------------------------------------------
File "/build/zope.testing-4.10/src/zope/testing/doctestcase.txt", line 96, in doctestcase.txt
Failed example:
    result = suite.run(unittest.TextTestResult(sys.stdout, True, 3))
Expected:
    test_loggingsupport (tests.MoreTests) ... ok
    test_renormalizing (tests.MoreTests) ... ok
Got:
    test_loggingsupport (tests.MoreTests.test_loggingsupport) ... ok
    test_renormalizing (tests.MoreTests.test_renormalizing) ... ok
----------------------------------------------------------------------
File "/build/zope.testing-4.10/src/zope/testing/doctestcase.txt", line 322, in doctestcase.txt
Failed example:
    result = suite.run(unittest.TextTestResult(sys.stdout, True, 2))
Expected:
    test2 (tests.MyTest) ... ok
    test3 (tests.MyTest) ... ok
    test4 (tests.MyTest) ... ok
Got:
    test2 (tests.MyTest.test2) ... ok
    test3 (tests.MyTest.test3) ... ok
    test4 (tests.MyTest.test4) ... ok

It would seem that the same error appears here

Expected behavior

I get a shell where I can run poetry commands

Notify maintainers

I'm sorry, I'm a nix noob. I'm not sure where to look.

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.75, NixOS, 22.11 (Raccoon), 22.11pre421411.2001e2b31c5`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.11.0`
 - channels(matt): `"nixos"`
 - channels(root): `"nixos-22.11pre421411.2001e2b31c5, home-manager"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@MatrixManAtYrService MatrixManAtYrService changed the title pkgs.python311Packages.poetry has doctest failures python311Packages.poetry has doctest failures Nov 24, 2022
@MatrixManAtYrService
Copy link
Contributor Author

I've found that I can work around this issue by replacing:

        pkgs.python311Packages.poetry

with

    pkgs.python311
    pkgs.poetry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants