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
  • 10 years ago

Installs

  • Total 3K
  • Win 1K
  • Mac 487
  • Linux 766
Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3 Sep 2 Sep 1 Aug 31 Aug 30 Aug 29 Aug 28 Aug 27 Aug 26 Aug 25 Aug 24 Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5 Aug 4 Aug 3 Aug 2 Aug 1 Jul 31 Jul 30 Jul 29 Jul 28 Jul 27 Jul 26
Windows 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 1 0 1 0 1 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 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 0 0 0 1 0 0 0
Linux 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

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.