Created
May 25, 2021 11:16
-
-
Save jsenin/3c88c72c6582f3605c193b203c0d3ac4 to your computer and use it in GitHub Desktop.
ultisnip snip for mamba specs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# reduce the time whe your write a mamba spec file | |
# easy use: :UltiSnipsEdit | |
# | |
global !p | |
def sanitize_spec_fn(fn): | |
return fn.replace("spec.py", "").replace("_", " ") | |
endglobal | |
snippet mamba "mamba spec skel" | |
from mamba import description, context, it | |
from expects import expect, equal | |
with description("${1:`!p snip.rv = sanitize_spec_fn(snip.fn)`}"): | |
with context("${2:context}"): | |
with it("${3:test expectation}"): | |
expect(True).to(equal(False)) | |
endsnippet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment