예제 #1
0
파일: test_cli.py 프로젝트: yerejm/ttt
 def test_args(self):
     with patch("ttt.monitor.create_monitor", autospec=True) as monitor:
         cli.run()
         assert len(monitor.call_args_list)
         args, kwargs = monitor.call_args_list[0]
         assert "watch_path" in args
         assert kwargs["build_path"] == "buildpath"
         assert kwargs["generator"] == "Ninja"
         assert kwargs["define"] is None
예제 #2
0
파일: test_cli.py 프로젝트: yerejm/ttt
 def test_args(self):
     with patch('ttt.monitor.create_monitor', autospec=True) as monitor:
         cli.run()
         assert len(monitor.call_args_list)
         args, kwargs = monitor.call_args_list[0]
         assert 'watch_path' in args
         assert kwargs['build_path'] == 'buildpath'
         assert kwargs['generator'] == 'Ninja'
         assert kwargs['define'] is None
예제 #3
0
파일: test_cli.py 프로젝트: yerejm/ttt
 def test_irc_enabled(self):
     with patch('ttt.monitor.create_monitor', autospec=True) as monitor:
         cli.run()
         assert len(monitor.call_args_list)
         args, kwargs = monitor.call_args_list[0]
         assert 'irc_server' in kwargs
         assert kwargs['irc_server'] == 'testserver'
         assert kwargs['irc_port'] == 6666
         assert kwargs['irc_channel'] == '#test'
         assert kwargs['irc_nick'] == 'testtest'
예제 #4
0
파일: test_cli.py 프로젝트: yerejm/ttt
 def test_irc_enabled(self):
     with patch("ttt.monitor.create_monitor", autospec=True) as monitor:
         cli.run()
         assert len(monitor.call_args_list)
         args, kwargs = monitor.call_args_list[0]
         assert "irc_server" in kwargs
         assert kwargs["irc_server"] == "testserver"
         assert kwargs["irc_port"] == 6666
         assert kwargs["irc_channel"] == "#test"
         assert kwargs["irc_nick"] == "testtest"
예제 #5
0
파일: test_cli.py 프로젝트: yerejm/ttt
 def test_exclusion_list(self):
     with patch('ttt.monitor.create_monitor', autospec=True) as monitor:
         cli.run()
         assert len(monitor.call_args_list)
         args, kwargs = monitor.call_args_list[0]
         assert kwargs['exclude'] == ['*.o', 'blah']
예제 #6
0
파일: test_cli.py 프로젝트: yerejm/ttt
 def test_exclusion_list(self):
     with patch("ttt.monitor.create_monitor", autospec=True) as monitor:
         cli.run()
         assert len(monitor.call_args_list)
         args, kwargs = monitor.call_args_list[0]
         assert kwargs["exclude"] == ["*.o", "blah"]
예제 #7
0
파일: test_cli.py 프로젝트: yerejm/ttt
 def test_patterns(self):
     with patch('ttt.monitor.create_monitor', autospec=True) as monitor:
         cli.run()
         assert len(monitor.call_args_list)
         args, kwargs = monitor.call_args_list[0]
         assert args == ('watch_path', set(['file1', 'file2']))
예제 #8
0
파일: test_cli.py 프로젝트: yerejm/ttt
 def test_irc_disabled(self):
     with patch('ttt.monitor.create_monitor', autospec=True) as monitor:
         cli.run()
         assert len(monitor.call_args_list)
         args, kwargs = monitor.call_args_list[0]
         assert kwargs['irc_server'] is None
예제 #9
0
파일: test_cli.py 프로젝트: yerejm/ttt
 def test_define_list(self):
     with patch('ttt.monitor.create_monitor', autospec=True) as monitor:
         cli.run()
         assert len(monitor.call_args_list)
         args, kwargs = monitor.call_args_list[0]
         assert kwargs['define'] == ['test=y', 'foo=bar']
예제 #10
0
파일: test_cli.py 프로젝트: yerejm/ttt
 def test_verbosity_none(self):
     with patch('ttt.monitor.create_monitor', autospec=True) as monitor: # noqa
         cli.run()
     assert Terminal.VERBOSITY == 0
예제 #11
0
파일: test_cli.py 프로젝트: yerejm/ttt
 def test_clean(self):
     with patch("ttt.monitor.create_monitor", autospec=True) as monitor:
         cli.run()
         assert len(monitor.call_args_list)
         args, kwargs = monitor.call_args_list[0]
         assert kwargs["clean"]
예제 #12
0
파일: test_cli.py 프로젝트: yerejm/ttt
 def test_no_args(self):
     with patch("ttt.monitor.create_monitor",
                autospec=True) as monitor:  # noqa
         with pytest.raises(SystemExit):
             cli.run()
예제 #13
0
파일: __main__.py 프로젝트: yerejm/ttt
def main():
    if sys.stdout.isatty():
        colorama.init()
    cli.run()
    sys.exit(0)
예제 #14
0
파일: test_cli.py 프로젝트: yerejm/ttt
 def test_irc_disabled(self):
     with patch("ttt.monitor.create_monitor", autospec=True) as monitor:
         cli.run()
         assert len(monitor.call_args_list)
         args, kwargs = monitor.call_args_list[0]
         assert kwargs["irc_server"] is None
예제 #15
0
파일: test_cli.py 프로젝트: yerejm/ttt
 def test_patterns(self):
     with patch("ttt.monitor.create_monitor", autospec=True) as monitor:
         cli.run()
         assert len(monitor.call_args_list)
         args, kwargs = monitor.call_args_list[0]
         assert args == ("watch_path", set(["file1", "file2"]))
예제 #16
0
파일: test_cli.py 프로젝트: yerejm/ttt
 def test_verbosity_none(self):
     with patch("ttt.monitor.create_monitor",
                autospec=True) as monitor:  # noqa
         cli.run()
     assert Terminal.VERBOSITY == 0
예제 #17
0
파일: test_cli.py 프로젝트: yerejm/ttt
 def test_define_list(self):
     with patch("ttt.monitor.create_monitor", autospec=True) as monitor:
         cli.run()
         assert len(monitor.call_args_list)
         args, kwargs = monitor.call_args_list[0]
         assert kwargs["define"] == ["test=y", "foo=bar"]
예제 #18
0
def main():
    if sys.stdout.isatty():
        colorama.init()
    cli.run()
    sys.exit(0)
예제 #19
0
파일: test_cli.py 프로젝트: yerejm/ttt
 def test_no_args(self):
     with patch('ttt.monitor.create_monitor', autospec=True) as monitor: # noqa
         with pytest.raises(SystemExit):
             cli.run()