Skip to content

Instantly share code, notes, and snippets.

@itsmemattchung
Created April 1, 2015 21:44
Show Gist options
  • Save itsmemattchung/36f619efe8cf9c0a7a1d to your computer and use it in GitHub Desktop.
Save itsmemattchung/36f619efe8cf9c0a7a1d to your computer and use it in GitHub Desktop.
why would you have a nested function with mock in there?
1064 class TestTokenize(TestCase):
1065
1066 def test_tokenize(self):
1067 import tokenize as tokenize_module
1068 encoding = object()
1069 encoding_used = None
1070 def mock_detect_encoding(readline):
1071 return encoding, [b'first', b'second']
1072
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment