File: test_cmd_dumpdb.py

package info (click to toggle)
doit 0.36.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,704 kB
  • sloc: python: 11,863; makefile: 33; ansic: 14; javascript: 3; sh: 1
file content (18 lines) | stat: -rw-r--r-- 617 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import pytest

from doit.cmd_dumpdb import DumpDB

class TestCmdDumpDB(object):

    def testDefault(self, capsys, dep_manager):
        if dep_manager.whichdb in ('dbm', 'dbm.ndbm'): # pragma: no cover
            pytest.skip('%s not supported for this operation' % dep_manager.whichdb)
        # cmd_main(["help", "task"])
        dep_manager._set('tid', 'my_dep', 'xxx')
        dep_manager.close()
        cmd_dump = DumpDB()
        cmd_dump.execute({'dep_file': dep_manager.name}, [])
        out, err = capsys.readouterr()
        assert 'tid' in out
        assert 'my_dep' in out
        assert 'xxx' in out