Skip to content

Instantly share code, notes, and snippets.

@jsenin
Created May 25, 2021 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsenin/3c88c72c6582f3605c193b203c0d3ac4 to your computer and use it in GitHub Desktop.
Save jsenin/3c88c72c6582f3605c193b203c0d3ac4 to your computer and use it in GitHub Desktop.
ultisnip snip for mamba specs
# 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