Login
Sign Up For Free
English
中文 (繁體)
中文 (香港)
中文 (简体)
日本語
Filipino
Bahasa Indonesia
Bahasa Melayu
Pусский
Português (Brasil)
Magyar
Français
Español
Deutsch
Čeština
العربية
Català
Dansk
Ελληνικά
فارسی
Suomi
Gaeilge
Hindi
עברית
Hrvatski
Italiano
Norsk bokmål
Nederlands
한국어
Polski
Română
Slovenský
Svenska
Türkçe
українська
беларуская
ไทย
Standard view
Shin
@absszero
22
Friends
16
Fans
Karma
62.02
Shin
2 years ago
@Edit 2 years ago
Python mock 的時機,必須在模組被系統快取(sys.modules)之前。
Why python mock patch doesn't work?
module A
def hello:
return 'hello'
B1
from a import hello
# hello 一引用就被快取到 sys.modules, 無法 mock
B2
from . import a
a.hello()
# 呼叫的時候,hello 才快取到 sys.modules, 可以 mock
Shin
2 years ago
果然好的開發大大帶你上天堂 節省生命時長
VSCode插件开发踩坑 · Issue #257 · FrankKai/FrankKai.github...
Shin
2 years ago
Mock 某個 import, 覺得不是很優雅, 但很有效~
luker.dev | How to unit test vscode extensions with ...
Shin
2 years ago
String.raw()~
冷知识:不起眼但有用的String.raw方法 - 掘金
Shin
2 years ago
最近在嘗試新的飲食習慣,所以就沒吃肉。然後就夢到自己在吃肉。
心理 OS....「不是說不吃肉,怎麼都放到嘴邊了!!」
Shin
2 years ago
自由迎來的同時,恐懼也向你襲來。
這或許是短暫的自由,代價是生存的恐懼。
Shin
2 years ago
這篇好棒, SAVE a lot of my time!
Setup and Use NextAuth.js in Next.js 13 App Director...
Shin
2 years ago
這就是 varchar(191) 雖然還是不懂...
Why are database columns 191 characters?
Shin
2 years ago
長知識了 a 是 ASCII 的意思
Where did the name `atoi` come from?
Shin
2 years ago
@Edit 2 years ago
A: Look at this, it's ugly, but completely.
B: So... It's completely ugly.
delete
reply
edit
cancel
cancel