Skip to content

Commit 58d3935

Browse files
author
charlesworth
committed
updated Pipfile to add scripts for running tests
1 parent 138c8f7 commit 58d3935

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

Pipfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ pytest = "*"
1313
"pytest-cov" = "*"
1414

1515
[requires]
16+
17+
[scripts]
18+
test = "python -m pytest tests/"

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,19 +157,19 @@ Please raise any bugs or feature requests as a Github issues. We also gratefully
157157
## Testing
158158

159159
```bash
160-
$ pipenv shell
161-
# to run a single test file
162-
$ python -m pytest tests/<test-name>_test.py
163-
164160
# to run all test files in tests directory
161+
$ pipenv run test
162+
163+
# or to run a single test file
164+
$ pipenv shell
165165
$ python -m pytest tests/<test-name>_test.py
166166

167167
# some test require supplying ip and token via the `--ip` and `--token` arguements
168-
$ python -m pytest evasdk/<test-name>_test.py --ip 172.16.16.2 --token abc-123-def-456
168+
$ pipenv run test --ip 172.16.16.2 --token abc-123-def-456
169169

170170
# long duration tests and tests requiring a connected Eva are disabled by default,
171171
# to include them add the `--runslow` or --runrobot flags
172-
$ python -m pytest evasdk/<test-name>_test.py --runslow --runrobot
172+
$ pipenv run test --runslow --runrobot
173173
```
174174

175175
## License

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def token(request):
2222

2323
def pytest_configure(config):
2424
config.addinivalue_line("markers", "slow: mark test as slow to run")
25-
config.addinivalue_line("markers", "requires_robot: no mocks, needs a connected Eva to run")
25+
config.addinivalue_line("markers", "robot_required: no mocks, needs a connected Eva to run")
2626

2727

2828
def pytest_collection_modifyitems(config, items):

0 commit comments

Comments
 (0)