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
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
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'
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"
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']
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"]
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']))
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
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']
def test_verbosity_none(self): with patch('ttt.monitor.create_monitor', autospec=True) as monitor: # noqa cli.run() assert Terminal.VERBOSITY == 0
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"]
def test_no_args(self): with patch("ttt.monitor.create_monitor", autospec=True) as monitor: # noqa with pytest.raises(SystemExit): cli.run()
def main(): if sys.stdout.isatty(): colorama.init() cli.run() sys.exit(0)
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
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"]))
def test_verbosity_none(self): with patch("ttt.monitor.create_monitor", autospec=True) as monitor: # noqa cli.run() assert Terminal.VERBOSITY == 0
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"]
def test_no_args(self): with patch('ttt.monitor.create_monitor', autospec=True) as monitor: # noqa with pytest.raises(SystemExit): cli.run()