Unverified Commit 7bcad5e2 authored by Dan Jones's avatar Dan Jones
Browse files

feat: add post install setup for python

parent 07f7f064
......@@ -13,9 +13,36 @@ should be run against all language ports of the adapter
A set of fixtures to be used to configure the tests.
### Implementations
## Implementations
You can see existing implementations of the test suite here
- [JS-Cucumber](https://git.noc.ac.uk/communications-backbone-system/backbone-adapter-javascript)
Step definitions are in `test/cucumber`
\ No newline at end of file
Step definitions are in `test/cucumber`
## Installing
The intention is to install a tagged version of the testsuite into each adapter so that if we develop
the testsuite existing adapter implementations won't break.
### NPM
```bash
npm install --saveDev git+https://git.noc.ac.uk/communications-backbone-system/backbone-adapter-testsuite.git#[tag|branch|commit]
```
### Yarn
```bash
yarn add --dev git+https://git.noc.ac.uk/communications-backbone-system/backbone-adapter-testsuite.git#[tag|branch|commit]
```
### PIP
```bash
echo
"git+https://git.noc.ac.uk/communications-backbone-system/backbone-adapter-testsuite.git@[tag|branch|commit]#egg=backbone-adapter-testsuite" >> requirements.txt
pip install -r reqiurements.txt
# copy features and fixtures into test directory
copy_tests
```
import os
from shutil import copytree
import site
def copy_directory(src, dest, directory):
copytree(os.path.join(src, directory), os.path.join(dest, directory))
def copy():
here = os.getcwd();
package_locations = site.getsitepackages()
for root_path in package_locations:
dirs = [x[0] for x in os.walk(root_path)]
for dirx in dirs:
if dirx.endswith('testsuite'):
src = dirx
dest = os.path.join(here, 'test')
copy_directory(src, dest, 'features')
copy_directory(src, dest, 'fixtures')
if __name__ == '__main__':
copy()
\ No newline at end of file
[options.entry_points]
console_scripts=
copy_tests = testsuite.copy_tests:copy
\ No newline at end of file
......@@ -2,7 +2,7 @@ from setuptools import setup
setup(
name='backbone-adapter-testsuite',
name='backbone_adapter_testsuite',
packages=['testsuite'],
package_dir={
'testsuite': '.',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment