NixOS / nixops

NixOps is a tool for deploying to NixOS machines in a network or cloud.
https://nixos.org/nixops
GNU Lesser General Public License v3.0
1.84k stars 363 forks source link

Test fails #622

Open moretea opened 7 years ago

moretea commented 7 years ago

I tried to run the tests as documented today, but they failed!

How to reproduce

$ nixos-version
16.09.1647.ff7777b (Flounder)
./dev-shell 
$ python2 tests.py 
E.....................................
======================================================================
ERROR: Failure: ImportError (No module named _sqlite3)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/nix/store/rf16sxb3f5yzfnryl1f0ahychxn9403l-python2.7-nose-1.3.7/lib/python2.7/site-packages/nose/loader.py", line 418, in loadTestsFromName
    addr.filename, addr.module)
  File "/nix/store/rf16sxb3f5yzfnryl1f0ahychxn9403l-python2.7-nose-1.3.7/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/nix/store/rf16sxb3f5yzfnryl1f0ahychxn9403l-python2.7-nose-1.3.7/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/home/maarten/code/nixos/nixops/kv-state/tests/functional/__init__.py", line 3, in <module>
    import sqlite3
  File "/nix/store/a21ahiimxzb3gc9vgdvxqlv4p4n5iph8-python-2.7.13/lib/python2.7/sqlite3/__init__.py", line 24, in <module>
    from dbapi2 import *
  File "/nix/store/a21ahiimxzb3gc9vgdvxqlv4p4n5iph8-python-2.7.13/lib/python2.7/sqlite3/dbapi2.py", line 28, in <module>
    from _sqlite3 import *
ImportError: No module named _sqlite3

----------------------------------------------------------------------
Ran 38 tests in 0.050s

FAILED (errors=1)
moretea commented 7 years ago

This can apparently be fixed by removing the sqlite3 import https://github.com/NixOS/nixops/pull/623/commits/3b36a83282c1eafef562e18ac56cf148737f0269

domenkozar commented 7 years ago

Do tests add pysqlite3 as dependency?