0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

python

Posted at

virtual environment

root@tokunori-desktop:/home/tokunori/nvme-cli# nose2 --verbose --start-dir tests nvme_create_max_ns_test
Traceback (most recent call last):
  File "/home/tokunori/.local/bin/nose2", line 5, in <module>
    from nose2 import discover
ModuleNotFoundError: No module named 'nose2'
root@tokunori-desktop:/home/tokunori/nvme-cli# pip3 install nose2
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
root@tokunori-desktop:/home/tokunori/nvme-cli# python3 -m venv /home/tokunori/nvme-cli
root@tokunori-desktop:/home/tokunori/nvme-cli# ./bin/nose2 --verbose --start-dir tests nvme_create_max_ns_test
test_attach_detach_ns (nvme_create_max_ns_test.TestNVMeCreateMaxNS.test_attach_detach_ns)
Testcase main ... 
Using nvme binary 'nvme'
FAIL



======================================================================
FAIL: test_attach_detach_ns (nvme_create_max_ns_test.TestNVMeCreateMaxNS.test_attach_detach_ns)
Testcase main
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tokunori/nvme-cli/tests/nvme_create_max_ns_test.py", line 50, in setUp
    super().setUp()
  File "/home/tokunori/nvme-cli/tests/nvme_test.py", line 80, in setUp
    self.create_and_attach_default_ns()
  File "/home/tokunori/nvme-cli/tests/nvme_test.py", line 107, in create_and_attach_default_ns
    self.ctrl_id = self.get_ctrl_id()
                   ^^^^^^^^^^^^^^^^^^
  File "/home/tokunori/nvme-cli/tests/nvme_test.py", line 206, in get_ctrl_id
    self.assertEqual(err, 0, "ERROR : nvme list-ctrl failed")
AssertionError: 1 != 0 : ERROR : nvme list-ctrl failed

----------------------------------------------------------------------
Ran 1 test in 0.091s

FAILED (failures=1)
root@tokunori-desktop:/home/tokunori/nvme-cli# ./bin/nose2 --verbose --start-dir tests nvme_create_max_ns_test
test_attach_detach_ns (nvme_create_max_ns_test.TestNVMeCreateMaxNS.test_attach_detach_ns)
Testcase main ... 
Using nvme binary '.build/nvme'
##### Creating 1
FAIL



======================================================================
FAIL: test_attach_detach_ns (nvme_create_max_ns_test.TestNVMeCreateMaxNS.test_attach_detach_ns)
Testcase main
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tokunori/nvme-cli/tests/nvme_create_max_ns_test.py", line 50, in setUp
    super().setUp()
  File "/home/tokunori/nvme-cli/tests/nvme_test.py", line 82, in setUp
    err = self.create_and_validate_ns(nsid,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/tokunori/nvme-cli/tests/nvme_test.py", line 388, in create_and_validate_ns
    self.assertEqual(int(json_output['nsid']), nsid,
AssertionError: 2 != 1 : ERROR : create namespace failed

----------------------------------------------------------------------
Ran 1 test in 0.079s

FAILED (failures=1)
root@tokunori-desktop:/home/tokunori/nvme-cli# 

link

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?