ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Pytest Snippets

by sloria ALL

Sublime Text Snippets for pytest

Labels snippets

Details

  • 2019.12.11.16.57.35
  • github.​com
  • github.​com
  • 5 years ago
  • 1 hour ago
  • 11 years ago

Installs

  • Total 3K
  • Win 1K
  • Mac 488
  • Linux 770
Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28 Oct 27 Oct 26 Oct 25 Oct 24 Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7
Windows 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0

Readme

Source
raw.​githubusercontent.​com

Sublime Text Snippets For pytest

Sublime Text snippets for testing with pytest.

Install

Package Control (the easy way)

Install Sublime Package Control if you don't have it.

In the command pallette (Cmd-Shift+P on Mac) type 'Install' then press enter to see a list of packages. Search for 'pytest snippets' then press enter to install.

…OR copy files to your Packages directory.

Linux

git clone git://github.com/sloria/sublime-pytest-snippets.git  ~/.config/sublime-text-3/Packages/python/sublime-pytest-snippets

Mac OS X

git clone git://github.com/sloria/sublime-pytest-snippets.git ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/Python/sublime-pytest-snippets

Windows

git clone git://github.com/sloria/sublime-pytest-snippets.git %userprofile%\AppData\Roaming\Sublime Text 3\Packages\Python\sublime-pytest-snippets

Examples

  • a== expands to assert first == second
  • a> expands to assert first > second
  • fixture expands to
@pytest.fixture(scope='function')
def name:
    body

All snippets

Assertions

  • a== and a!=
  • a~= and a!~=
  • a>, a>=, a<, and a<=
  • atrue and afalse
  • ain and a!in
  • ais and aisnot
  • araises

Fixtures

  • fixture
  • yieldfixture
  • mark
  • parametrize

License

Licensed under the WTFPL.