| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Comments:
<0> tests. <0> I don't know if that answers your question. <1> Hey, I'm trying to p*** some commands to a bash shell using os.popen(). I'm p***ing some variables on to the command but when I try to run it I get "popen() takes at most 3 arguments (8 given)". What function can I use to do this properly and still monitor the output? <2> P*** it as a string. <3> I see. But take this example. The program takes system input (e.g. network addresses), takes user options (e.g which network device), send data to a RPC server and the server stores that in a database. What exactly should I test? ... <4> or use interpolation. <1> would it be too much to ask how I would do that? <3> Should I write a big scenario test, like giving possible network addresses then checking in the server database if the results are as expected, or should I test each step (reading /proc, RPC procedures, etc)? <4> hobz: "%s" % variable <0> nictuku: Well, unit tests are called taht because they test units. <0> Not because they test the fool stack. <0> Holy ****! <3> I know that depends on what I want to achieve, but my question is if "use micro tests" is a rule <0> Sorry. <0> It's not a rule.
<0> Testing the full stack has to be done at some point. <5> unit tests are 'micro' by definition <1> sysfault: Once I figure out what that means and how to use it I"m sure I'll be very thankful. <0> But unit tests generally don't do that. <5> Poopsmith, they aren't unit tests if they do that <0> nictuku: the way I've done it is unit tests test a single function or cl***, and then I have a bigger test suite with fake data and such to test the full program. <0> Yango: Sure, but you can still use pyunit to do it. Now we're just talking semantics. :) <6> for the RPC tests you could set up a monkey-patched RPC server emulating a real one <2> Testing the full stack is when you shove a user in front of it and have them break it. <4> exalted> foo="tutorial"; print "read the %s" % foo <4> read the tutorial <2> Adding of course iptables rules to emulate a flaky network. <0> I don't know what program he's talking aboutl, but OK. <3> It's PyUnit, but yes, my question is about semantics :-) <5> nictuku, then you got your answer <3> yes, thank you all <5> heh, just realized about the 'fool stack' that's a stack I wouldn't want to mess with <7> why would one do something like from sys import stdin <7> instead of just import sys ? <7> does it bloat the code or something ? <5> rodrickbrown, IIRC, it takes longer to load only <3> Yango, which one takes longer? "from.." or "import .." ? <4> less typing, no need to access the method/attribute through sys. <5> nictuku, import. But usually what sysfault said is the main cause. BTW, as I said I'm not 100% sure about that, I'm waiting for someone to hop in and correct me if I'm wrong <8> hello <9> I want to hash a list, but lists (being mutable) aren't hashable. Tuples are. How do I convert a list to a tuple? <10> tuple(list) <9> CHodapp, yeah just noticed that one, thanks. <10> :) <4> ebel: mutable objects cannot are not hashable, being that their values can be changed resulting in a new hash value in which the dictionary lookup will not find. <9> Yeah I know, this is for dicts. I was just trying to get a pseduo-unique string for a list though. <11> Hey guys <11> hey Poopsmith <12> hm <12> anyone taken a look at Dunn's wxPython book? <4> no, but I've heard some good things about it. <12> I see <12> I remember someone in this channel bought it and made a comment or two, just don't rememebr who :-\ <11> Well, It's never wasted money to buy a book <11> Unless you can get all the info you need online :/ <12> well, you do have to be somewhat selective when your'e a student though <12> and yes, some books are wasted money <11> High school or university/college? <12> grad <12> unibverstiy <11> cool <11> what major? <7> http://blogs.sun.com/roller/resources/jyrivirkki/ruby.c <7> someone with too much time on their hands <12> applied maths <11> That you? <12> what? <13> I think scorchsaber means "did rodrickbrown write that?" <11> yes <11> erm <11> did I really type "that you?"? <14> anyone know anyone / anywhere where they talk mod py? <13> Cowmoo: indeed
<11> Well, I'm canadian. <11> Same thing <14> anyone at all <13> I'm USian. <11> heh <11> I don't know what mod py even is imajes, could you fill me in? <14> mod_python.... <11> yeah...? <13> I grew up around inarticulate people though, so I generally have a good grasp of what they probably mean. <11> I take offense to that <11> I'm not inarticulate <15> hi imajes, weren't you involved in mozilla before? <14> sure <11> I thought it was a link to a blog, I never read the full link <15> I recognize your nick <13> I didn't mean offense, so it really breaks me up inside that you did. <11> "void set_response_code(VALUE value, ID id, VALUE *data) <11> { <11> response_code = NUM2INT(value); <11> }" <11> That's why I don't like C <14> cool <14> yeah trying to debug a mod_python error <11> It should have Int32.Parse(value); like everybody else <11> godling: I don't really care. But I'm not illiterate, and thats the first time I've been called anything similar to stupid :) <11> except by my brothers <11> er--brother <16> hello <11> hey <11> Do you think It's a reasonable Idea to try to make a script for X-Chat in Python, even though I just got the basics down today? <13> scorchsaber: I didn't call you anything. <17> how can I tell if two file names are referring to the same file? <6> roadfish: Because they are symlinks/hardlinks or ? <11> godling: No, you didn't. but--well... You know exactly what you said. "I grew up around inarticulate people though" If that wasn't reffering to me, I'll be damned <11> roadfish: What do you mean? <11> In python? <17> Erwin: right symlinks <6> roadfish: You could os.stat the files and compare the device/inode numbers <9> scorchsaber, I threw a simple python xchat plugin together once. it was fun. :) <17> Erwin: ok, thanks ... I was looking at stat but I didn't twig in <6> roadfish: alternatively, use os.path.realpath which expand symlinks <9> scorchsaber, go for it. It's great to have something that actually *does* something <17> ok, realpath sounds the best in my situation <17> Erwin: txn <11> How do I get input from the user? heh...eh..... <11> something like a = readline <11> I dunno <18> When installing 2.4.3 on a WinXP machine does one need to set the PYTHONPATH environ? <18> Also does Python need to be added to the PATH/ <19> scorchsaber: raw_input() <8> i'm trying to run a program from python on win32, winword, so i do os.spawnl(os.P_NOWAIT,winword_path,'C:\\Documents and Settings\\...\\text.doc'), but i get winword not finding the path "and", how should i p*** the path of the .doc? <11> thanks gzl <11> Thanks again gzl, I've got how it works now <20> Is there a way to list the attributes of an object from within idle? <21> dir(foo) <21> for the names, or vars(foo) for their names and values <20> Thanks <8> i'm trying to run a program from python on win32, winword, so i do os.spawnl(os.P_NOWAIT,winword_path,'C:\\Documents and Settings\\...\\text.doc'), but i get winword not finding the path "and", how should i p*** the path of the .doc? <11> load /home/scorchsaber/Test.py <11> shoot <11> damn <11> huh <11> that works <11> can anybody else see that? Or is it just printed to my own screen for some reason or other? <8> bah <11> sorry mate <11> can you see " Testing, 1, 2, 3 <11> This came from my own test Python Plugin for X-chat. <11> Module has no __module_name__ defined" <20> jleedev: dir() seems to show methods, but not attributes. <11> 'cause I can <8> i'm trying to run a program from python on win32, winword, so i do os.spawnl(os.P_NOWAIT,winword_path,'C:\\Documents and Settings\\...\\text.doc'), but i get winword not finding the path "and", how should i p*** the path of the .doc?, using " 's didn't work either <11> I really don't know <7> mariodemon_11, dont you want os.environ['winword_path']
Return to
#python or Go to some related
logs:
jscal delete while glob mysql multiple replace mdadm unable to read superblock #perl could not save master table #fedora #ubuntu ubuntu Satellite M70-169 noganex
|
|