« first day (2333 days earlier)      last day (2614 days later) » 

8:00 PM
to help with fixture data, there is a small helper function that just overrides the values based on the kwarg you provide so your fixture is updated accordingly to test whatever it is you are testing at that moment.
 
@MarcusS so you have the skills of a fellow developer/researcher!
 
development research
 
pop?
 
May whoever implemented autoplaying audio for that page step barefoot on a lego when they least expect it
 
8:08 PM
or autoplay in general
 
some twitter-embedded video I saw was such that if you pause it, move to another tab, and go back again, it resumes :|
 
@idjaw requests.get('http://chat.stackoverflow.com/messages/6/35981240').text
 
@davidism :-O ..... why did I think that would not have worked
 
8:15 PM
oh man
 
The joys of chat's "api".
 
the magic has been un-magicked....and I'm enlightened
thanks
 
Unfortunately, you can't get it with just the message id, even though it's unique. You need to know the room it's currently in.
So if you have a message id only, you need to fetch the transcript, which does work with only the message id, then parse the room id out.
 
Ah, "message" instead of "messages". How'd you find that one?
"messages" is the one used the "see full text" link.
 
8:24 PM
@davidism from the Java chat API.
 
And you can get rendered / non-rendered out of it, that's good.
I guess I mean "how did they find that". Probably by just playing around with the urls more than I did.
 
Yes, or perhaps, they knew an insider who gave out the secrets.
 
Too bad the insider isn't pushing for an actual documented api.
I still hold out hope.
 
Lol, yep. There has been no hints at a chat API by SE.
 
This week is about to become really unproductive.
 
8:37 PM
oh snap I forgot that game was coming out
 
Breath of the Wild's already out, Amazon just messed up the release day delivery.
It's the only reason I got work done over the weekend.
 
hello
I try to compile a program with WebKit, so I have
from webkit import WebFrame, WebView

import gobject
import unittest

class TestWebFrame(unittest.TestCase):

    def setUp(self):
        gobject.threads_init()
        self.view = WebView()
        self.mainFrame = self.view.get_main_frame()

    def testloaduri(self):
        self.mainFrame.load_uri("about:blank")
        self.assertEqual("about:blank", self.mainFrame.get_uri());


    def tearDown(self):
        self.view.destroy()

if __name__ == '__main__':
    unittest.main()
problem is I get this, AttributeError: 'module' object has no attribute 'WebView'
 
Did you call your own file "webkit.py"?
 
no it's called "test_webnavigationaction.py"
 
And what package are you using for webkit?
 
heh pytest ruined me, every time i see def setUp, especially with that camelCase, i wanna slam my head on the desk :D
 
Every time I have to remember what assert methods exist in what Python versions. Ugh.
 
I still haven't seen the preverbal light and am still camel casing my unit tests like a rock star
 
> preverbal
 
8:48 PM
@davidism that's why you use plain assert and pytest :P
 
@BhargavRao or chat exchange?
 
Yeah, exactly. Love assertion rewriting.
 
@AndrasDeak ah, yeah. I've yet to go through that. :/
 
Whenever I do an assert in my program I format it like assert a == 23, "got {}, expected 23".format(a) and it makes me wish there was something to autogenerate those error messages
 
Thanks, was a pyc wekit file hidden
stupid language
 
8:51 PM
That's CPython's fault, not Python's ;-) stupid implementation!
 
DSM
@Kevin: I do the same, only as a pytest user, without the "got {}, expected 23".format(a)" part. ;-)
 
There was a great bug in Alembic where if you did a migration then changed branches, the migration would be gone but the pyc file would remain, so migrations would get inexplicably out of sync.
 
Does pytest magically provide helpful assertion failure messages, or do you just go without?
 
@Kevin my laziness would win there -> assert a == 23, repr(a)
 
is possible to compile pyton file into binary/executable on linux?
 
@davidism ugh.... that's embarrassing...I missed the edit window....why did my brain not write proverbial
oh wim just showed up....and I'm still not using pytest
hides
 
DSM
@Kevin: it presents the original and the substituted, so you get errors like
    def test_func():
        a =3
>       assert a == 4
E       assert 3 == 4
 
pfft, you removed the dot right when i wanted to point out that it's pytest and not py.test since some time
 
Neat.
 
even though it's not very pretty in some more complex cases ;)
assert someobj.foo == [1, 2, 3]
 
8:55 PM
Cosmic punishment for writing complex code.
 
that gives you something like "with a = <someobject's repr>.foo" in the error message
 
Unreadable stack traces are punishment for the hubris of man
 
> However, if you specify a message with the assertion then no assertion introspection takes places at all and the message will be simply shown in the traceback.
 
wim
@Kevin Gee, if only there was a better test runner for Python ..
 
So you can provide messages, with the assumption that the message is more descriptive than what the rewrite would tell.
 
DSM
8:57 PM
@ThiefMaster: ehh, not in the situations I use it for. (Not saying you're wrong, just that I don't hit them.)
>       assert s.foo == [1, 2, 4]
E       assert [1, 2, 3] == [1, 2, 4]
E         At index 2 diff: 3 != 4
E         Use -v to get the full diff
 
Old school: pushing a boulder up a hill, only for it to fall back down, forever.
New school: pushing a change to production, only for automated testing to fail, forever.
 
DSM
I get things like the above.
 
maybe it was something else, i don't remember the code ;)
@Kevin but it's already in production, so screw the tests :P
 
Every time I write unittests, I just picture a badger looking at me menacingly. Judging me....
 
Attitude like that will get you sent to the meeting room of Tantalus, where the box of donuts is juuust out of your reach, and people keep asking follow-up questions about the last item on the itinerary.
 
DSM
9:00 PM
A colleague and I sometimes arg disagree about whether "sociable" unittests are allowed or whether they should be as solitary as possible. I say yes, he says no. (Yes, they should be allowed, I mean.)
 
wim
Sociable? Like, they tweet about the test results?
 
DSM
I'm too lazy to do other than google: " As the name suggests, Solitary unit tests should only test functionality of one class, everything else should be stubbed or mocked. Conversely, sociable unit tests will test interactions between components, but will not go into great detail on every single collaborator."
 
..."why not both?"
 
DSM
Well, every real-world suite usually has lots of both, so it's mostly an emphasis thing, but you can definitely tell what modules he wrote the tests for and what ones I wrote the tests for because of our different leanings.
 
But what's the argument for not having them be "allowed"?
 
wim
9:13 PM
ok, what you're calling that I call integration testing vs unit testing
and yes, it's good to have both
and not so good to have airy-fairy tests that are somewhere halfway in between
 
DSM
Maybe that was too strong -- "disfavoured", let's say. The argument against having too many non-solitary tests is that it's easy to bury an assumption in the coupling (in numeric code, say some normalization.)
 
wim
I have another argument against it
if you're only testing one small branch of code but the test needs to touch many many other parts of the code (because you didn't mock out enough stuff) then the test suite can get very slow
when the test suite runs thousands of tests in a couple of seconds, that's really nice
and you can test on every commit
if the test suite takes 5 mins to run, you stop bothering ... you run the tests and go and make a coffee ... workflow suffers
 
but the worker has coffee, so win-win
 
DSM
Good grief. I'm up to ~300 example commands for a numpy tutorial and I literally haven't done ANY ARITHMETIC WHATSOEVER. Just going into how ndarrays work and are shaped.
 
perhaps you're overdoing it?
you'll need 500 alone for broadcasting
or do those 300 include that?:D
 
DSM
9:26 PM
I think it seems longer than it is because a lot of them are just for demonstration and will go quickly in practice, he told himself optimistically..
 
hands-on, or unilateral kind of tutorial?
 
DSM
Mix. Distributing a jupyter notebook.
 
:)
how many weeks for the course?;)
 
DSM
Two days..
 
FWIW that's more than what I expected
I will venture into the realms of black magic and try to visualize a vector field with vtk-python :/
wait, stupid me, why not mayavi?
aw yiss
BAH no python3 because vtk no python 3
what year is this?
 
9:37 PM
1659
 
wait, maybe there's hope
 
from datetime import date
print date.today().year
 
You're about 500 datetimes short of a proper datetime import
nice try though
 
oh I saw a funny one today
    See Also
    ========

    sympy.simplify.simplify.simplify
part of an actual docstring
 
docs.python.org/3/whatsnew/3.5.html <-- how do i link to a section of this page?
 
9:42 PM
hover over title -> paragraph icon on the right
if it doesn't appear, then there's no anchor to link to
 
Gotcha, I thought i could link it to the "note" bit
Poor person had to wait 5 minutes because i was trying to work it out :D
 
*AFAIK
 
9:57 PM
I love it how it's already a challenge in itself to find out how to install vtk
matches the user experience perfectly
I mean, why would anybody want to install it?
I'm half expecting to end up with a pay-per-view link to a book
yam it, I'll just use it with python 2 :|
 
"well-written answer" someone says... errr
Literally can't make the fact its the wrong version into a good answer :(
Oh, well, that'll do
 
@AndrasDeak vtk is visualization toolkit?
 
10:32 PM
yup
 
11:07 PM
I can't tell whats frustrating getting ready to move or learning to code :D
 
why not both?:P
 
well, I'd be frustrated too learning to code while moving, or vice versa
Chances are the moving might be the priority here.
The coding will still be there when you come back
That's my $0.02
 
ahem, CAD 0.02 to be fair
 
ugh fine
CAD 0.02
 
good;)
 
DSM
11:11 PM
Or CAD 0.00 in practice. :-P
 
hehe
 
DSM
Hey, raccoon outside my window! Cute guy, and obviously not having a hard time finding food.
 
awww:)
I love raccoons
 
 
easy for me, they're not native here
 
11:13 PM
DSM....you were part of that time too, right? :)
 
DSM
@AndrasDeak: that may have been too obscure for non-Canucks. We don't have pennies any more and so have no easy way to pay 2 cents..
 
I got that (for a change, pun unintended)
 
we do the same thing with integer forints, considering the exchange rate:D
 
@DSM \o/! haha :) yay
 
11:14 PM
5 forints is the smallest physical representation
 
DSM
missed my bus :-(
 
it really does look like an angry toaster
boo DSM....I'm still at work too
 
DSM
The next one doesn't come for half an hour :-( :-(
 
yuck. do you have anything interesting near by you can kill time at
 
DSM
I'm at home, so yeah. But still. :-)
 
11:29 PM
ooh. haha
 
11:41 PM
Anyone have recommendations for a burger joint here in Jersey? Or New York, for that matter
 
hmm
I think so. Hold on
Simple and fast -> Shake Shack
don't know if it's near you though
@WayneWerner ^^ go down to jersey
 
one just across the whatever the body of water is there. Bay?
Hudson river, I guess
 
Bae
 
@WayneWerner or you can take this challenge and report back to us and tell us which one in fact is the best -> nj.com/jerseysbest/2015/06/…
we expect you to try all of them....tonight
god speed, Wayne...god speed
 
Seems legit. I guess that's like a pub crawl - what would you call the burger joint equivalent?
The best way to die?
 
11:46 PM
coronary stenosis
 
We need to keep it simple
in the spirit of the burger
Burger crawl
it's exactly what it is
it can imply you might end up at a pub! So, bonus is you can get a beer!
 
you're making me hungry
 
me too
 
oh man. don't get me started on burgers
 
I love burgers so much
burgers and hot dogs. They are just such beautiful creations.
 
11:50 PM
you should compare who's burger
 
Shake Shack has a pretty good burger
 
I'm glad I wasn't way off.
Glad a New Yorker validated that :D
 
Depends on what you're looking for though (bar vs. restaurant vs. grab and go, etc)
 

« first day (2333 days earlier)      last day (2614 days later) »