IRC Logs for #circuits Sunday, 2014-05-11

prologicI know exactly how to write tests for it :)01:05
pdurbin...01:06
pdurbinyeah?01:07
prologicwell the thing is01:18
prologicam I wasting my breathe commenting on the issue? :)01:18
prologicthe solution to tests is almost precisely how circuits itself is tested01:18
prologica mix of unit tests and integration tests01:18
prologicoften the integration tests tests components of circuits against polar opposites01:19
prologice.g: TCPServer tests against TCPClient and vice versa01:19
prologicall of the IRC protocol component is unt tested01:19
prologicand so on01:19
prologicif I were to implement tests for kdb01:19
prologicit would be the same01:19
prologica mixture of unit tests that can easily be unit tested01:19
prologicand integration tests01:19
pdurbinso circuits has IRC protocol tests?01:20
prologicwhich would likely see an implementation of an IRC Server and associated IRC Server Protocol hit circuits01:20
prologicyes of course!01:20
prologicfull coverage of the features the irc protocol implements01:20
pdurbinnice01:20
prologici.e: most basic client functionality01:20
prologicdid you think with nearly 300 unit/integration tests that we'd miss circuits.protocols.irc? :)01:21
pdurbin:)01:21
prologicso these guys can continue to hand write code till the cows come home01:21
prologicbut at the ned of the day01:21
prologicif you use something like circuits01:21
prologic(or even Twisted *shudder*)01:21
prologicyou're going to save yourself a lot of wheels01:21
prologicand time01:21
prologicalso01:22
prologiccircuits and any circuits app is easier to "mock"01:22
prologicbecause you can just mock out the events that would otherwise have normally been reacted to01:22
prologicthis is how circuits.protocols.irc is tested and mocked01:22
pdurbinbut kdb doesn't have any tests01:23
prologichttps://bitbucket.org/circuits/circuits/src/tip/tests/protocols/test_irc.py?at=default01:23
prologicnot at the moment no01:24
prologicbut writing them is trivial to say the least01:24
pdurbinprologic: what if you wrote one test for it? :)01:25
prologicsure01:25
prologicwhat?01:25
prologicname one aspect and I'll write a test for it :)01:26
prologicbrb01:26
pdurbinprologic: how about the hi/yo feature?01:26
prologicheh01:42
prologictest the gertting plugin huh01:42
prologicsure01:42
prologicnow see I can easily test this in osiloation01:42
prologici.e: mock it out01:42
prologicand/or01:42
prologicI can do complete integration tests of it01:42
prologicbut I'l need to implement a mnimalist irc server for that01:43
pdurbinthat's what I was wondering, if you'd have to do that01:43
prologicI would01:44
prologicif I wanted full integration tests01:44
prologicbut I can do both01:44
prologicand you should do both :)01:45
prologicideally01:45
pdurbinyeah01:45
prologicpdurbin, done02:36
prologichttp://codepad.org/SuxTUSSg02:36
prologichttps://bitbucket.org/prologic/kdb/commits/4964e018ef81ea2d7f4431a45160174da7b16f7602:38
prologicthat one test has brought coverage up from 0% to 12%02:39
prologicand this took me all but an hour or less :)02:40
prologicwe're having Mother's Day lunch so I had to look after my daughter in between :)02:40
prologicI don't have a full integration test implemented yet02:41
prologicthat'll take a little longer because of the need to write an irc server (polar opposite of kdb) to do full end-to-end testing of all aspects of kdb02:41
prologicbut with this one test added one (I) can follow this pattern easily to test almost every aspect of kdb02:41
pdurbinprologic: nice! thanks! I'd like to go comment on https://github.com/shaunagm/oh-irc-bot/issues/17 but I'm getting "503 Service Unavailable" :(02:43
prologicahh02:46
prologicwell hopefully I've demonstrated what you're after02:46
pdurbinabsolutely!02:46
prologicI really do higly recommend they just scrap oh-irc-bot02:46
prologicfor kdb02:47
prologicand/or kdb with extra plugins/mods02:47
prologicseriously02:47
pdurbinfor now I left messages in #openhatch: http://irclogs.jackgrigg.com/irc.freenode.net/openhatch/2014-05-11#i_335346202:47
prologiccircuits just makes all this oh so easy02:47
prologic:)02:47
pdurbin:)02:47
pdurbinsure02:47
pdurbinthe thing I like about their bot is that it does something useful with only a few lines of python with no dependencies02:48
prologichehe02:48
prologicnice just read the log02:48
pdurbinplus, they wrote it themselves02:48
pdurbinand it's fun for them to hack on02:48
prologicwell sure02:48
pdurbinas a simple sample project02:48
prologiceach to their own I suppose :)02:49
pdurbinthey're all about getting people into open source for the first time02:49
pdurbinpeople want to contribute02:49
prologickdb is obviously a bit more complex02:49
pdurbinbut don't know how02:49
prologicwith plugin support02:49
prologicand all sorts of stuff builtin :)02:49
pdurbinsure02:49
pdurbinprologic: well, at least I've helped push you along your roadmap a bit :)02:50
pdurbinand now you can go answer those two (closed) stackoverflow questions about how to test IRC bots :)02:50
pdurbinhttp://stackoverflow.com/questions/7546026/testing-an-irc-bot and http://programmers.stackexchange.com/questions/132263/testing-an-irc-bot02:51
pdurbinanyway, late here02:52
pdurbinprologic: thanks again!02:52
*** nablack has joined #circuits02:52
*** nablack has left #circuits ("Byebye")02:52
prologichehe nps03:03
*** Romster has quit IRC05:24
*** Romster has joined #circuits05:26
*** Osso has joined #circuits05:28
*** Osso has quit IRC05:33
*** Osso has joined #circuits09:27
*** Romster has quit IRC10:20
*** Zimsky has joined #circuits13:00
prologichi Zimsky21:25

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!