Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Communications Backbone System
backbone-adapter-testsuite
Commits
7bcad5e2
Unverified
Commit
7bcad5e2
authored
2 years ago
by
Dan Jones
Browse files
Options
Download
Email Patches
Plain Diff
feat: add post install setup for python
parent
07f7f064
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
3 deletions
+58
-3
README.md
README.md
+29
-2
copy_tests.py
copy_tests.py
+25
-0
setup.cfg
setup.cfg
+3
-0
setup.py
setup.py
+1
-1
No files found.
README.md
View file @
7bcad5e2
...
...
@@ -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
```
This diff is collapsed.
Click to expand it.
copy_tests.py
0 → 100644
View file @
7bcad5e2
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
This diff is collapsed.
Click to expand it.
setup.cfg
0 → 100644
View file @
7bcad5e2
[options.entry_points]
console_scripts=
copy_tests = testsuite.copy_tests:copy
\ No newline at end of file
This diff is collapsed.
Click to expand it.
setup.py
View file @
7bcad5e2
...
...
@@ -2,7 +2,7 @@ from setuptools import setup
setup
(
name
=
'backbone
-
adapter
-
testsuite'
,
name
=
'backbone
_
adapter
_
testsuite'
,
packages
=
[
'testsuite'
],
package_dir
=
{
'testsuite'
:
'.'
,
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment