PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Monday the 11th of April, 2016

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[12:47:43] <pdobrogost> Hi all!
[12:48:26] <pdobrogost> How could I check how would normalized form of package's version look like from command line?
[12:49:07] <dstufft> python setup.py --version I think will do it
[12:49:15] <dstufft> unless you want to check arbitrary versions
[12:49:39] <pdobrogost> Thanks, will try.
[12:51:26] <pdobrogost> It's working, thanks dstufft.
[12:51:30] <dstufft> then you'll need do do something like ``pip install packaging > /dev/null && python -c 'import sys,packaging.version; print(str(packaging.version.parse(sys.argv[1])))' '1.0-dev-0'``
[12:51:46] <dstufft> pdobrogost: no problem :)
[12:52:15] <pdobrogost> Thanks for generic one too :)
[16:13:47] <dowwie> dstufft: you're going to PyCon?
[18:54:39] <dstufft> dowwie: No :/
[18:55:00] <dstufft> nedbat: argh, edx is gonna make me print out some CLA :'(
[18:55:27] <dowwie> dstufft: sorry to hear that
[18:55:38] <nedbat> dstufft: are you making a contribution?
[18:55:45] <dowwie> <3 MOOCs
[18:55:55] <dstufft> nedbat: ported bok-choy to py3
[18:56:02] <nedbat> dstufft: whoa, cool.
[18:57:00] <dstufft> nedbat: I want to use it to test Warehouse :]
[18:57:10] <nedbat> dstufft: extra cool!
[18:57:15] <dowwie> bok-choy seems useful
[18:57:27] <dstufft> I think I need to poke HPE legal or something about signing this
[18:57:27] <dowwie> dstufft: can you blog about it after?
[18:58:00] <dstufft> dowwie: I can try, not sure I'll find the time though :(
[18:58:19] <dowwie> you mean you dont write an entire blog article in less than an hour?
[18:58:30] <dstufft> sometimes when I'm really angry
[18:58:47] <dstufft> I mostly blog out of anger tbh
[18:58:58] <dowwie> does that help
[18:59:06] <dstufft> not really :V
[19:04:20] <dstufft> lol, I ask my manager about signing the CLA and the response I get is "oh the fun we're going to have :)"
[19:04:24] <dstufft> >:[
[19:04:43] <dstufft> All I did was wrap some stuff in list() and wrap some crap in six helpers :/
[19:10:07] <nedbat> dstufft: hmm, sorry.
[19:10:23] <dstufft> nedbat: heh, it's no worries :P
[19:10:41] <ngoldbaum> dstufft: sadly you can't just wrap the CLA in list() :(
[19:10:46] <dstufft> at least pip can just install from my github fork while Chris figures out who needs to sign what
[21:15:16] <ionelmc> dstufft: have you looked at pytest-splinter?
[21:16:49] <dstufft> ionelmc: nope
[21:17:34] <ionelmc> check it out, imo it's nicer than bok-choi
[21:18:14] <ionelmc> (i haven't used bok-choi, but the structure it enforces ticks me off)
[21:29:41] <dstufft> ionelmc: doesn't this have the problem that your test cases end up all having your HTML layout baked into them instead of centralizing that around a single class ?
[21:32:58] <ionelmc> dstufft: not sure what you're getting at; you can make assertions helpers or subclass/wrap the Browser object if things get too complex
[21:33:46] <dstufft> ionelmc: I guess I don't understand waht you don't like about bok-choy
[21:34:39] <ionelmc> dstufft: i don't like that it forces you to structure the tests in classes
[21:34:57] <ionelmc> maybe i just don't get their intro, it's very vague
[21:36:42] <ionelmc> then again, i don't like unittest and mock, so there's bias :-)
[21:37:33] <dstufft> Oh, you encapsulate logic inside of classes, like instead of doing browser.cssslect("div.project-title") # Hypthetical query method in every test that needs to get that information from your page (and thus, changing your HTML requires updating every test case) you make a class that has a method like def project_title(self): self.browser.cssselect("div.project-title"), and then just use that method in your tests
[21:37:46] <dstufft> I don't think it needs your tests themselves to be in classes
[21:37:57] <dstufft> you just make an object to encapsulate your page
[21:41:31] <ionelmc> hmm
[21:43:45] <dstufft> I'll take a look at pytest-splinter though, I'm still in my experimentation phase with a selnium testing setup
[21:49:38] <ionelmc> i still don't get why you need that is_browser_on_page method
[22:34:52] <dstufft> ionelmc: to make sure that your assumption (that the browser is currently on X page) matches reality. In particular, it ensures that you're running your tests on the page you think you are, so that you don't accidently have a passing test (or a more confusing error) if, for example, you're accidently redirecting people to the wrong page after a POST or something