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.1 (2015-12-23)
Packaging bugfix
1.0.0 (2015-12-21)
Initial public release
Project details
Release history Release notifications | RSS feed
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.1.tar.gz
(3.3 kB
view details)
Built Distributions
pytest_svn-1.0.1-py2.7.egg
(2.6 kB
view details)
File details
Details for the file pytest-svn-1.0.1.tar.gz
.
File metadata
- Download URL: pytest-svn-1.0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8fb0b68be5db4efd5abdc93a072259c1591bdfc43148884c98b8c539cf99df9 |
|
MD5 | ae8797abe773afb350c7a0918a04aa02 |
|
BLAKE2b-256 | 0ce7986fcd9ecd8f4ba91eda67ec9e0da6a1826bf51376f21fb33af13e76fb69 |
File details
Details for the file pytest_svn-1.0.1-py2.7.egg
.
File metadata
- Download URL: pytest_svn-1.0.1-py2.7.egg
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d8eed27f58a9c8f04bb57a8211d26d84c4b92147c8bf2cf34fc9ce7dbf4cd7e |
|
MD5 | f5d876b0dce8401b8a157dd71ac83633 |
|
BLAKE2b-256 | 308e51835c1031ad1996225b27ce8ee7d22051bc364277b4e53eeaf65cd0cc86 |
File details
Details for the file pytest_svn-1.0.1-py2-none-any.whl
.
File metadata
- Download URL: pytest_svn-1.0.1-py2-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 759c963c1c792dda97b7fa0ede627a562b91120ded91dd4449529480f879ad56 |
|
MD5 | d41d813e6e45afdbd0bda25c2402f477 |
|
BLAKE2b-256 | 9c59900c7123c32ef242c2efca37d08821b1a4a2aed162158a55ac066542e377 |