Skip to main content

SVN repository fixture for py.test

Project description

Creates an empty SVN repository for testing that cleans up after itself on teardown.

Installation

Install using your favourite package installer:

pip install pytest-svn
# or
easy_install pytest-svn

Enable the fixture explicitly in your tests or conftest.py (not required when using setuptools entry points):

pytest_plugins = ['pytest_svn']

Usage

Here’s a noddy test case that shows it working:

def test_svn_repo(svn_repo):
    # The fixture derives from `workspace` in `pytest-shutil`, so they contain
    # a handle to the path.py path object (see https://pythonhosted.org/path.py)
    path = svn_repo.workspace
    file = path / 'hello.txt'
    file.write_text('hello world!')

    # We can also run things relative to the repo
    svn_repo.run('svn add hello.txt')

    # The fixture has a URI property you can use in downstream systems
    assert svn_repo.uri.startswith('file://')

Changelog

1.0 (2015-12-21)

  • Initial public release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-svn-1.0.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distributions

pytest_svn-1.0.0-py2.7.egg (2.5 kB view details)

Uploaded Source

pytest_svn-1.0.0-py2-none-any.whl (4.2 kB view details)

Uploaded Python 2

File details

Details for the file pytest-svn-1.0.0.tar.gz.

File metadata

  • Download URL: pytest-svn-1.0.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pytest-svn-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1eef32a71a5f332adb986871aaa1b45440a8405523b73d5ef060ba90341d1649
MD5 ff6a51bb809c54579d7c6c06a6cadf41
BLAKE2b-256 6b6318443f7eb5b594e96a78f34dceeb81eac5569e5144a657e877246608bbf5

See more details on using hashes here.

File details

Details for the file pytest_svn-1.0.0-py2.7.egg.

File metadata

File hashes

Hashes for pytest_svn-1.0.0-py2.7.egg
Algorithm Hash digest
SHA256 222feff41bc5d6bc88c03ff9baeb762654f60548eb99919872d8fea175a682d4
MD5 8cc9fada538b732774f31bf831fd3888
BLAKE2b-256 0defff5267ad7f8b01f83965af08637bc1c68fcbd602e41d729222d6109cc3aa

See more details on using hashes here.

File details

Details for the file pytest_svn-1.0.0-py2-none-any.whl.

File metadata

File hashes

Hashes for pytest_svn-1.0.0-py2-none-any.whl
Algorithm Hash digest
SHA256 51da79c564d5fc809127e39a3969d808a0c639d4c41f3c1561a1665c411ca3fb
MD5 b9eaef847fb56256d1fbc00165759629
BLAKE2b-256 3f03c6d3f8dfb6b411d2aa5e0bbb663185368790b110b5320878b8d0fa4ef32c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page