Why does this Python os.environ persist across tests?

Why does this Python os.environ persist across tests in pytest. The Python code modifies os.environ in a test without cleanup. In Python test suites this leaks config to other tests.

#whatswrongwiththispythoncode #pythonbug #pythonproductionbug #pythondebugging #pythonbackend #pythoncodereview #pythonmistake #pythonbestpractices #pythonreliability #pythonincident #pythonapi #pythonengineering ...

https://www.youtube.com/watch?v=-4gO_vqVSC8

Why does this Python os.environ persist across tests? #pythonapi

YouTube

Why is this Python price rounding wrong?

Why is this Python price rounding wrong in billing. The Python code builds Decimal from a float, so binary precision leaks into money math. In Python finance this creates off by cents totals.

#whatswrongwiththispythoncode #pythonbug #pythonproductionbug #pythondebugging #pythonbackend #pythoncodereview #pythonmistake #pythonbestpractices #pythonreliability #pythonincident #pythonapi #pythonengineering #pyt...

https://www.youtube.com/watch?v=wrkMRPbp91g

Why is this Python price rounding wrong? #pythonbestpractices

YouTube

What's wrong with this Python cache refresh?

What's wrong with this Python cache refresh under load. The Python code lets every request recompute the value when it expires, causing a stampede. In Python services this melts the database.

#whatswrongwiththispythoncode #pythonbug #pythonproductionbug #pythondebugging #pythonbackend #pythoncodereview #pythonmistake #pythonbestpractices #pythonreliability #pythonincident #pythonapi #pythonengineering ...

https://www.youtube.com/watch?v=EAnLdUclDwo

Whats wrong with this Python cache refresh? #whatswrongwiththispythoncode

YouTube

What's wrong with this Python database loop?

What's wrong with this Python database loop in an API endpoint. The Python code queries once per item, creating an N plus one pattern. In Python services this kills latency and database load.

#whatswrongwiththispythoncode #pythonbug #pythonproductionbug #pythondebugging #pythonbackend #pythoncodereview #pythonmistake #pythonbestpractices #pythonreliability #pythonincident #pythonapi #pythonengineering ...

https://www.youtube.com/watch?v=N6sw4QnOV00

Whats wrong with this Python database loop? #whatswrongwiththispythoncode

YouTube