mgorny, to opensource Polish
@mgorny@pol.social avatar

Typowa sytuacja we współczesnym , na przykładzie ekosystemu języka .

Wiele projektów używa biblioteki , by nadpisywać wskazania zegara na potrzeby testów. FreezeGun powoli przestaje być rozwijany. W końcu zaczyna mieć problemy z nowymi wersjami Pythona. Dystrybucje, takie jak , są odporne na te problemy, bo mogą łatwo dodać lokalne łatki.

Tak więc projekty zaczynają korzystać z . Niestety, time-machine opiera się na hakowaniu detali implementacji CPythona (w imię wydajności, bo przecież nadpisywanie czasu w testach to wydajnościowe wąskie gardło), więc na nie działa w ogóle. Niektóre projekty wspierają FreezeGun i time-machine równocześnie, inne nie.

Czasem time-machine łapie segfaulty na CPythonie. Z czasem coraz więcej segfaultów zostaje zgłoszonych. Nie ma więc zaskoczenia, że nowe zgłoszenia błędów nie spotykają się z odpowiedzią. W międzyczasie, FreezeGun na nowo zaczyna być rozwijany. No i zgadnijcie, co teraz się dzieje…

https://github.com/aio-libs/aiohttp/commit/a7bc5e9eeae7c5c90898411962e9a74bf10a9cef
https://github.com/aio-libs/aiohttp/commit/43f92fae09bcc9692ee96ac1413eda884afa2f63

dpreacher, to python

even with whatever years of experience i have, i still suck at writing code that will reliably work without dry testing and some things are just hard to dry test. like making sure a list of email addresses correctly receive the mail...without actually sending the mail or the correct data gets saved to db once at midnight...unless it is midnight, etc. etc. the reason i spend a few minutes even on weekend to make sure i fix it right away. i can figure out the fix but not the bug beforehand

dpreacher,

@tshirtman will look at . thanks for the suggestion. for email situation, the issue was a mistake on my part of basic python lists comprehension...as in my comprehension of how list functions and join function works. somehow i thought it would be syntax error, but that is wrong of me. for time sensitive thing, the data is only available at that time and the challenge is always whether the live db will auth and take in the data correctly. but as i said, i figure and fix it eventually.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • ngwrru68w68
  • cubers
  • magazineikmin
  • thenastyranch
  • rosin
  • Durango
  • InstantRegret
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • DreamBathrooms
  • provamag3
  • ethstaker
  • osvaldo12
  • tester
  • modclub
  • normalnudes
  • everett
  • GTA5RPClips
  • tacticalgear
  • Leos
  • anitta
  • megavids
  • cisconetworking
  • lostlight
  • All magazines