Python Bytes - #414 Because we are not monsters
Episode Date: December 16, 2024Topics covered in this episode: New project to shorten django-admin to django because we are not monsters django-unicorn: The magical reactive component framework for Django Testing some tidbits T...he State of Python 2024 article Extras Joke Watch on YouTube About the show Sponsored by us! Support our work through: Our courses at Talk Python Training The Complete pytest Course Patreon Supporters Connect with the hosts Michael: @mkennedy@fosstodon.org / @mkennedy.codes (bsky) Brian: @brianokken@fosstodon.org / @brianokken.bsky.social Show: @pythonbytes@fosstodon.org / @pythonbytes.fm (bsky) Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too. Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it. Brian #1: New project to shorten django-admin to django because we are not monsters Jeff Tripplet has created django-cli-no-admin to shorten django-admin to just django. “One of the biggest mysteries in Django is why I have to run django-admin from my terminal instead of just running django. Confusingly, django-admin has nothing to do with Django’s admin app.” Instead of typing things like: django-admin startproject mysite projectname We can type the shorter: django startproject mysite projectname I love this kind of developer speedup / comfort improvements And yes, Jeff wants Django to eventually include this as the default way to run the command line utilities. Michael #2: django-unicorn: The magical reactive component framework for Django Add modern site functionality: Quickly add in simple interactions to regular Django templates without learning a new templating language. Skip the JavaScript build tools No API required: Skip creating a bunch of serializers and just use Django. Brian #3: Testing some tidbits Ned Batchelder Different ways to test to see if a string has only 0 or 1 in it. And also, a way to check all the different ways to make sure they work. Fun post, and I learned about cleandoc - a way to strip leading blank space and maintain code block indentation I usually use textwrap.dedent() partition - splitting strings based on a substring Using | to pass imports to eval() - I don't use eval much. However, no pytest! Here’s a way to check all this with pytest: Testing some tidbits with pytest Michael #4: The State of Python 2024 article Python usage with other languages drops as general adoption grows 41% of Python developers have under 2 years of experience Python learning expands through diverse channels The Python 2 vs. 3 divide is in the distant past Flask, Django, and FastAPI remain top Python web frameworks Most Python web apps run on hyperscale clouds Containers over VMs over hardware uv takes Python packaging by storm Extras Brian: More Django: Dracula Theme for Django Admin Michael: Zen Browser update Office refresh Transcripts (in some players) Joke: Volkswagen, passing all the tests
Transcript
Discussion (0)
Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
This is episode 414, recorded December 16th, 2024. I'm Michael Kennedy.
And I'm Brian Ocken.
And this episode is brought to you by us, all of our things, books, courses, stuff like that.
We have many things for you to get better at Python. Check them out, links at the top of the show.
And we are now pretty active on Blue Sky.
Brian, thanks for dragging me over.
And I want to point out that you can go to my profile
and click on Starter Pack.
And there's a bunch of Python people.
If you click that, you follow me, you follow Brian,
you follow the podcast,
plus something like 60 other noteworthy Python people
like Samuel Colvin and others.
So that's a real quick and easy way to jump in there and kind of get going on that.
If you want to get...
Starter packs are pretty cool.
I like...
Starter packs are a really cool growth hack for Blue Sky.
Yeah.
Yeah.
Blue Sky is fun.
I'm enjoying it over there.
I'm wondering if the surge of momentum is starting to fade a little bit, but we'll see.
I know people are excited and I think it's,
I think it's a great place.
So I encourage people to check it out.
If you would like to get every week,
all the show notes and links and everything delivered to your inbox,
even if you don't happen to listen that week,
which I don't know why that would happen,
Brian,
that would be a big mistake,
but it would be very weird.
But even then
if you go to pythonbytes.fm click on newsletter enter your information well then brian will send
you a handcrafted artisanal version of the show notes so very awesome i did say heavy jango heavy
didn't i brian yeah let's start let's start with jango well we're gonna start with a uh a small
item but i think it's it going to affect me right away.
So Jeff Triplett announced he's got a new project to shorten Django-admin to just Django.
And what we're talking about isn't the admin section of Django.
It's just the command.
So the thing, like on the command line oh i have it up in like a tutorial so like uh like
for instance the django tutorial there's there's there's a bunch of django admin command line
things uh that you have to run like start project or um and a bunch of other stuff too so if you
type django dash admin and some stuff like that and you've ever thought why can't i just type
django to do this?
Jeff has thought that too. So that this new project just makes it so that you, um, you just
pip install it with your stuff. And then you, uh, you don't have to use Django admin anymore. You
can just use Django for, for the, um, the command line thing. Um, so the, and the idea, um, I mean,
it's a, it's a great idea. And he does say in his,
we've got a blog post announcing it that he would like to see this in the
normal Django,
but the Django dash admin won't go away anytime because it's already been
there for 20 years or more. So,
but it'd be great if it was just like this because why not?
Yeah. That'd be amazing. I don't see why you couldn't have them both.
And I think, I mean, this because why not yeah that'd be amazing i don't see why you couldn't have them both and i think i mean what other commands do you type django on the command line and do stuff for most
people right yeah exactly you just take it yeah so exactly and you can have multiple entry points
in the django package when you install it which will give you both commands as you see fit so
yeah let's do it yeah um uh also i've been doing a lot of jango lately and
uh i i appreciate just it's half the characters uh if i counted them he he mentioned it's half
the characters i'm like really yep it's not just half the characters even more significantly it's
the dash right which requires like a incantation on your keyboard a little bit yeah the different
yeah it's not as fast to type. Thanks, Jeff.
So I would like to ask
you, Brian, having done some Django lately,
have you seen any unicorns?
Yeah.
No. Because I have.
I saw Pegasus, but not a unicorn. Yes, the Pegasus.
That is like a unicorn, but
I don't believe it has a horn or as much magical
powers. Okay.
I'm not entirely sure of the mythology of Pegasi versus unicorns,
but the magical reactive component framework for Django is the Django
unicorn.
This is pretty neat.
I just learned about this.
Let's see.
Is it,
it's,
it's not super new.
I just,
it's super new to me.
Okay.
So the idea here is that it's a little bit like a JavaScript front-end framework,
like React or something.
But you can avoid using it.
You can avoid writing your own JavaScript front-end.
Instead, you can just pip install Django Unicorn, add it as an app,
and then you've got to include its scripts and so on.
But somewhere down here, you can use use these unicorn attribute modifiers in your
template right you can say unicorn submit dot prevent add and then instead tie that to if i
don't scroll too quickly you can tie that to a model called task and if you hit escape what does
it do it'll change like a replace the task text with that this thing right here right and you can just add a
button when you click this call the function add and so on and then what you
do is you go and you create like a form object and an item that maps to it and
then it just automatically wires together the creation of of these let's
see where's the example so yeah not enough here and the little example on
the home page for me to totally know
exactly how it works. But basically when you interact with this UI element, it maps to
REST functions implemented by the unicorn thing automatically, right? So you can just include some,
it's a little bit like HCMX. You just include some magical text on there and it'll call back
to the server. But the difference is it'll handle it on the server as well right okay pretty neat yeah so if it says is it magic
sort of feels like it it progressively enhances normal django views with the initial render being
server-side rendering which is like i said like htmx as well depends how you use it but it can be
so it's good for seo it just
the pure html content is there it's not just like angle brackets everywhere when you view source
it binds the elements you specify automatically and makes the ajax calls on its own when it needs
it and it comes back and it updates the dom when the html changes or with the html changes so yeah
just write normal django type. And it takes it, it says
it also has other features, form validation, redirections, dirty states, partial updates,
polling, et cetera. And then down here somewhere, maybe it's in the docs, it says, here's what you
might do instead, right? You might have to use React or you might have to use this other thing.
Unfortunately, I think that's here on this page. It says what else you might have to use. Yeah, there's better examples on their landing
page. It gives you sort of a comparison to Vue, React, et cetera. What is notably lacking here
is HTMX, which like I said, is kind of like it. But nonetheless, if people are doing Django and
they want something like Vue or React, but they don't really want to do JavaScript,
this could be a pretty interesting thing to check out. 2,400 GitHub stars, pretty decent. And this is a fairly basic, like low learning curve to just try to, it might be enough before
you jump into something else. So yeah, absolutely. And by the way, real time follow up on your item.
This is what I thought when I heard about the Django admin.
Pat Decker just says, alias Django equals Django-admin.
And that's exactly, I'm like, yep.
I have so many things like that.
I'm like, that's a huge wrong command.
That is alias to two letters.
Okay, fine.
I could do that also.
But it's nice.
I mean, why impose the longer version on everybody until they get either think about it or you know a lot of
people are new when they take these tutorials they don't know that they can do that kind of stuff
right or you might be like on windows and i have no idea how to alias anything on windows
so batch files it's all batch files all right over to you oh what am i talking about um i wanted to
talk about uh testing a little bit um i had fun time uh reading
this article from ned batchelder called testing some tidbits so this is sort of a fun thing so he
he posted he just posted uh like let's say you had this um you wanted to he wanted to look at
different ways to to check to see if a string only had zeros or ones in it and nothing else. And there's a lot of ways you could do this.
He presented, let's see, one, two, three, four, five, six different ways in a post on
both Mastodon and Blue Sky.
And then he got a whole bunch of replies saying like other ways to do it.
And one, it's kind of a fun, just like like how would i do this sort of thing um and
there's a lot of ways to handle it which is fun anyway so he he also wanted to test how to do it
and since there's testing in the title i thought maybe he'd use my test or something but uh yeah
no um he's got like a set of good input that should be just all zeros and ones. And then a set of bad input that has, you know, it's not all.
And some of it's like a whole bunch of zeros and just one non-zero.
The empty string is used.
That would be considered good.
And then even a thousand character, a string with a thousand characters in it.
Or 10,000?
It's 10,000.
Wow.
So big, long string long string so and then a
whole bunch of different ways that he had his original checks but plus a whole bunch of others
that other people used um and then his he just runs through them uh but that one of the things
i really loved about this is i learned some stuff about pytest or python i learned about CleanDoc from inspect.cleanDoc.
It's a way to strip out white space that I usually use.
What did I use?
I usually used like TextRapid dedent for something like this.
But so I'm going to have to run some testing to find out which one deals with stuff better.
CleanDoc.
That might be better.
Yeah, that's cool.
And then there's partitioning.
I don't use partition much,
so I didn't remember what that does.
So partition, he was using partition to strip out comments.
And what it does is split a string on whatever you pass it in,
in this case, the pound sign or hash
or whatever you want to call it.
And then he used, and then it splits that into three strings before the,
before the delimiter,
what the delimiter was and after.
And so this is,
this is a way to just grab everything before the comment,
which is cool.
And then he used,
what else did I learn?
Oh,
I didn't understand what this,
if not test is in here for first,
but this was checking for blank lines,
which makes sense or stuff with just a comment but then um uh there's this eval which i am so afraid of evals
but in this case you're writing the stuff it's from right here so it's pretty safe but um evaling
the code and then passing in a variable like the S variable into the code.
So everywhere in this code, the S means the string you're passing in.
But this or G, what does or G do?
And what he's doing is it's a way with eval to pass in imported stuff.
So it imports the regular expression and the counter modules into the eval statement.
So I didn't know you could do that.
I was thinking bitwise or.
Yeah.
No, it's a way to get these imports in there,
which is pretty cool.
Anyway, that's fun.
And then he lists some other ways.
But I was still frustrated that there's no PyTest in here.
So I thought, how would I do this with PyTest?
So I just wrote up a quick blog post,
actually just praising Ned as well,
because I learned some stuff.
I like learning new things.
But then what did I do?
I imported PyTest, the same imports that he used,
and then the same good and bad and tests.
But then I just split it up a bit different
and used parameterization to write the test code
so if anybody wants to use pytest instead here we go the excellent the one fun thing that i had was
this uh 10 000 character i'm using with parameterization i was able to take the the input
as part of when you you do pytest dash v it prints out all this. It's the parameterization prints out,
which is nice.
But I didn't want 10,000 characters printed out.
So I also got to use the ID function
to shorten that up a bit,
shorten it to 20 characters.
But anyway, testing tickets.
Yeah, I love the compare and contrast as well.
Yeah.
Yeah, awesome.
Let's talk some trends, huh?
Okay.
So this was originally just going to be an extra.
The more I looked at it, I'm like, this actually could be a fun conversation for you and me
to have.
So I wrote a article for the JetBrains blog called the state of Python in 2024.
So I thought that'd be pretty fun.
And there's eight key trends or whatever I pulled out.
So I thought, Hey, you know, maybe, maybe that'd be fun to talk about the eight trends and get your thoughts on it.
All right. So let's do it real quick. So first of all, Python, Python keeps growing,
but it's interesting that actually, if you look at the amount of other languages used
along with Python, they're decreasing, right? So for example, in 2021, 40% of Python people did JavaScript plus Python.
Now it's only 35.
If you look at Bash, 33% of people did.
Now 29 do.
And a lot of languages are going down like that,
except for Rust.
So that's pretty interesting.
And that's because so many people are coming into Python
from non-traditional programming languages like
data science and other scientists and so on. You know, GitHub just announced that, I think we
covered this, that GitHub said that Python is the most popular language on GitHub now. It's pretty
awesome. But most of those people are coming from non-traditional backgrounds, meaning they're just
going into like Jupyter Notebooks or something like that, right? Like this is their only programming language is Python. Yes, exactly.
Exactly. They're like, they just became programmers. So they're not doing the other
stuff. So it's interesting to see these like, hey, you're doing less JavaScript as a community,
which is kind of the opposite of what I would imagine. And very, very closely to what you said,
41% of Python developers have been working professionally
in any language for less than two years like almost everyone is new here yeah and actually
i remember somebody uh talking about this this um this question like maybe it was a different
question but like how long have you been a professional python developer and a lot of
people taking this survey don't think of themselves as developers they think of
themselves as just some other job they happen to use programming also yeah exactly yeah and then
if you throw in three to five years that like that's pretty much it trend three let's go up to
the years again where are we at oh just 11 plus so we're just in one bucket of 13 of the people
and even so that's only like over 10 years is basically only 13%, which is wild.
Yeah, that's really wild.
Yeah, yeah, yeah.
Where do people learn Python?
They learn it on YouTube, on R. John Codes, M. Coding.
And if they listen to podcasts, talk Python to me.
This is the number one out there.
Nice.
But I'm sure Python Bites is just under, just under.
Trend four, Python 2 versus 3, that's over.
What is that?
We've raged on about the legacy Python long enough.
There will be no 2.8, says Guido,
all the way back in 2014, right?
But if you look at it, it's like asymptotically,
like whoever's still on Python 2,
they just, those people aren't leaving.
Yeah, what's surprising to me
is the people that are still on that
and are participating in surveys.
I think they just fully have checked out.
I imagine a lot of those people,
which is 6% for this year,
that are still on Python 2,
that they're on some huge project.
I know there's some banks that have-
Yeah, they're not going to migrate the project.
The project will not migrate,
but those people would very much like to,
and they probably in their spare time
work with FastAPI and other modern things.
But when they go back to work, they're here.
You know what I mean?
Yeah, or at least some of their project is using that.
Yeah.
Yeah, exactly.
But still, let's keep going all right flask django
and fast api are all the top three frameworks which is nearly a dead heat which is pretty
interesting we just talked a lot about django but what's interesting is if you ask web developers
who are python people not just python people but you know we talked about there's a lot of people
who don't consider themselves like developers or whatever.
But if you say, hey, web developers who are also Python people, Django is used one and a half times as much as Flask or FastAPI.
Oh, yeah.
So amongst the web developers, Django is clearly leading the pack.
But amongst data scientists, Flask and FastAPI are ahead because they're more about building
APIs and getting their models online and so on. that's a pretty interesting difference right yeah and i'm
thinking there's a lot of data or data science stuff that doesn't have a back database or
anything or yeah some huge thing yeah yeah uh where do you host your stuff it's all about the
hyperscale clouds apparently which is blowing my mind actually aws google cloud and azure represent
gosh how much did it say i wrote it down maybe at the top represent something like 78 percent
of where people host their code yeah 78 percent are on one of the three massive clouds heads
nerds showing up heads nerds there yeah i mean we put a dent in heads nerd we definitely did
we got it we got one server there.
Yeah, and also Heroku interestingly went down,
but I think that's because when they canceled their free tier,
a lot of people decided to turn off there for move elsewhere.
But Python Anywhere is going strong, actually,
above all the other small providers, right?
DigitalOcean, Hetzner, Linode, and so on.
Python Anywhere, interesting.
Yeah, that's pretty wild, right?
All right, two more. People prefer containers over VMs
and they prefer VMs over bare hardware.
That shouldn't be a surprise, should it?
I mean, maybe the containers versus VMs,
but certainly not just straight hardware.
Straight hardware is not even on the picture, by the way.
It's like lower.
And last trend of 2024 is UV takes the Python packaging,
takes Python packaging by store.
Yes. I think that's obviously, we've covered it a bunch of times it's not just that it's fast it's that it combines
a bunch of functionality from different tools into different places yeah it's super neat it
installs python it installs it creates virtual environments it manages projects if you wish
it updates there's a lot of a lot of good stuff there.
And I think a big part of the UV uptick is the UV team tried to make it so that you could use it with your current workflow.
You didn't really have to change your workflow.
Yeah, I think that is very much an important part of it.
That's why I adopted it for sure.
So, yeah.
So anyway, these are my trends.
Hopefully people find those interesting.
There's a lot of writing and data to back that up in the link. Yeah. All right. Yeah. So anyway, these are, these are my trends. Hopefully people find those interesting. There's a lot of like writing and data to back that up in the link.
Yeah. All right. Yeah.
Extra.
We've come to extras.
I just got one extra toggling back to Django just for a moment is I noticed
the Django admin has a Dracula theme now under the Dracula theme.com.
And I can't, The Django admin has a Dracula theme now under the Dracula theme.com.
And I can't, I can't remember where I learned it from.
One of the maintainers posted this on,
on,
on blue sky,
I think.
But anyway,
it looks great.
Great colors.
And I also,
because of this learned that there is a thing called Dracula theme.com that
contains like a whole bunch of different projects
that all have Dracula theme.
Oh, nice.
Let's see what else.
I love it.
Yeah, and it has cool bats.
Oh, no.
No Pat++.
No Pat++.
That's funny.
Nice.
VS Code?
Cool.
Yeah, obviously.
Obviously.
GNOME, Visual Studio.
Oh, yeah.
I guess people use Visual Studio still.
Anyway.
Yeah, Vue on Windows.
JetBrains, of course.
Nice, cool.
Yeah, I had no idea about this site.
That's super cool.
That's fun.
How about extras for you?
I have a couple.
Let's see here. First of all, my Zen browser experiment is still going strong. I'm absolutely loving the Zen
browser. It's based on Firefox, which I really like. Okay. But that also means that you're
limited to the Firefox limitations. Like I can't use it for our live stream because our live stream
only supports Chrome, which really means Chromium based browsers. Right. So I, there's certain times
that I'm not using it, but yeah, I'm enjoying people can check
that out.
I talked to somebody and they're like, this is what Firefox should have built.
This is like fire.
Why is Firefox not doing this?
Yeah.
You know, it's, it's a good question.
I do think I honestly, you know, as sort of a sidebar, I'm, I'm a little worried what's
going to happen to Mozilla and Firefox.
If the antitrust thing against Google
goes through, right? Because if that goes through, 90% of Mozilla's revenue instantly gets declared
illegal and cut off. Not illegal for Firefox and Mozilla, but illegal for Google, so they would
have to stop, right? Yeah, maybe. I'm not following that. Well, one of the big problems is Google has used their monopoly and their money and all that to buy off locations to basically pay to either be the default or to prevent competition in different ways.
For example, they're paying something like $23 billion to Apple to be the default search engine, not just in Safari on iOS, but if you go to Siri and you ask it a question, right?
It says, oh, here, I'm going to search the web for you.
Like, how do you think it's going to search the web?
Yeah, that's paid.
That's okay.
Right.
But they're also paying, I don't remember the number, but it's 90% of the revenue of
Mozilla to support Mozilla.
But, you know, there's a lot of thinking that that is to be the default search engine on
Firefox, right?
But so that would make it illegal for them to do that.
It's the double whammy.
They're kind of paying Mozilla to keep Firefox around
so they can say that there's competition, right?
But if they can no longer pay Mozilla to be the default search engine,
anyway.
It's fishy, though.
Is there really competition when you're competitor is paying you to be there?
I know.
Well, I mean, why is there a lawsuit, right?
Yeah.
So we'll see.
Anyway, I think it's really cool.
I'm enjoying it.
Still a big fan of Vivaldi as well, which is what I'm talking to you on right now.
Also, did you know that Microsoft has a browser?
I heard of that.
Oh, you know what?
It's actually just based on Chrome.
Although Google doesn't pay for that one, I don't okay i bet you get bing as your default search engine
there all right uh refresh my desk setup i just i really i'm enjoying this way more i set up a
little separate table and a little separate computer so i have a nice view so i'm not looking
at like cameras and lights and junk all day oh wow even wow. Even if they're turned off, I'm still just staring at a wall
with like sound padding and stuff.
And I enjoy it way more than I realized.
And I just want to encourage people,
like you're kind of frustrated
with where you're sitting,
where you're looking while you're at work.
Like maybe it's not that much work.
It took a couple hours.
So I can look at trees instead of recording foam,
which I encourage.
All right.
While I was sitting at this fun new desk, Brian,
I added a really cool feature to our RSS feed when I realized that there's an updated spec to RSS, which allows you to specify transcripts in subtitle format.
So web VTT or SRT files.
All right.
Okay.
So I added those to our set of transcripts to the website supplies to RSS feed.
And now you get real time follow along as you and I speak transcripts.
Oh, wow.
Isn't that cool?
So you can just say show the transcripts and it's kind of like a Spotify or YouTube music.
It's just like follows along as we speak in the real transcripts.
And I think you can even search them, although that's probably a per player type of thing.
So this doesn't work in Overcast, sadly, but it does work as far as i can tell in apple podcasts and pocket casts so at least in
those two if you see a little transcript thing and you click it that means it's going to follow
along in real time with our conversation i wanted to have the the little bouncy ball like uh you
know the sing-along movies when we're good? Yeah, exactly. And it works really good on an iPad.
Like you can have the view of the control and the art and everything,
and then next to it it has.
Oh, nice.
But it also works on the phone.
All right.
That's it for my extras.
All right.
Oh, I just wanted to add,
it took five days to generate those transcripts
with the computer running 24 hours a day.
So I regenerated these because only maybe a third of our episodes days to generate those transcripts with the computer running 24 hours a day to to to so i
regenerated these because only yeah only maybe a third of our episodes had vtt format they had a
different format just it's like a pure text type thing that our website understands and people can
read but vtt is more of us it's like not json but i mean imagine like here's your json transcript
to read right it would feel a little bit like that. Yeah.
So I've always thought of VTT as like some extra setting that is completely useless
because I'd never use it.
So I'm glad that you have a use for it.
You could use SRT.
Those are the two that are supported here.
Those are like the two well-known subtitle formats or whatever.
But yeah, I fired up.
I have my old M1 Mac mini laying around.
I'm like, I'm just going to go over there and have it generate these for Python bytes
and talk Python.
Five days later, it was done.
And then I have a whole bunch of Python software that goes through and like correct stuff.
Like rough formatter is like R-O-U-G-H.
I'm like, eh, no, not really.
That's not what we meant to say. And it'll sometimes get your, you'll be Brian Aiken. I'm like, eh, no, not really. That's not what we meant to say. And it'll sometimes get your,
you'll be Brian Aiken. I'm like, Nope, we're going to fix that. And so on.
Sometimes I'm Brian Aiken.
So there's a lot of work that went into making this happen.
So hopefully people enjoy it. And yeah, cool.
Thanks for it. And I appreciate you keeping improving the back end of Python Bytes.
So thanks.
Yeah, you're welcome.
No problem.
Okay.
You know what?
If you were working on software, you started this show off with testing, right?
Yeah.
Well.
No, you started off with the jingle.
But we did talk a lot about testing.
Second item. Anyway, if you were doing testing and you wanted to make sure your tests pass, you have many options, Brian.
You could not run the test.
But if the tests are going to run and say continuous integration, whoa, boy, you better make those tests pass or continuous integration is going to fail.
So Martin Bettman shared this joke with us on Blue Sky, said, how about Volkswagen?
You know, they kind of got in a little bit of trouble for writing their car software to say, yes, these diesels, they're so clean.
You should absolutely get clean diesel, not dirty diesel, get a Volkswagen.
What that really meant was while it's under test, it's going to change how it behaves to have a
better emissions test than not right so this is riffing on that and says volkswagen this is a
thing you can install into your apps is it detects when your tests are being run in a ci server and
make sure they pass okay i gotta check this out that's hilarious yeah it says why well if you
want your software to be adopted by Americans,
because that's where VW got caught for their cheating,
test scores from the CI server are very important.
Volkswagen uses a defeat device to detect when it's being tested,
and a CI server will automatically reduce the errors to an acceptable level for the test to pass. This allows you to spend less time worrying about testing and more time enjoying the good
life as a trustful software developer.
They even have a badge, like a readme for your GitHub readme.
Yeah, with a build passing with a little Volkswagen symbol.
That's great.
Works for Travis CI, Circle CI, Jenkins, Hudson's, Bamboo, TeamCity, TFS, Visual Studio Online CI, GitLab, etc., etc., etc.
And it defeats Astert, Tap, Tape, and Shy in any test actually that is set to exit code or throw an error.
That's funny.
That's bad, right?
I've got to check out to see all the ways they're doing it.
Yeah.
I know.
I was wondering, like, how does this actually work? people don't really do this it's a joke well um
so i've i've actually had cases where uh especially when during development where i didn't want the ci
to jump out at the end of the test even if there's failures um so there is a pi test feature where
you can change the exit code.
It's a PyTest custom exit code
internal plugin or something.
PyTest dash always exit zero?
Pretty much, yeah.
To override the exit code
so that you can debug the rest of the tool chain
or get data on something.
But yeah.
That's the only time I've done that.
But that's funny.
It's a little funny that the image
or the logo of it or whatever
is like a little Volkswagen bug from the 70s
that transforms into a transformer robot.
Amazing.
Nice.
There's 13 contributors to this.
There's 15 releases.
What is this?
How many stars?
Okay, okay, let's find out 15 000 stars
people are using this thing oh my goodness or just amused by it it's nine years old
yeah it has been around for a while but i ran across this and thought it's pretty funny so
this is good yeah yeah all right well as always thanks for being here thanks everyone for listening
thank you bye yeah bye