Skip to content

Commit

Permalink
Issue220 (#221)
Browse files Browse the repository at this point in the history
* [qacode] added conftest.py+fix for issue #220

- separate envs for py-test plugins that generate reports
- removed unneccessary arguments at pytest.ini

* [qacode] CHANGELOG for issue #220
* [qacode] fix for circleCI 001
* [qacode] fix flake8 errors
* [qacode] fix for tox -e docs
  • Loading branch information
netzulo authored Feb 11, 2019
1 parent cc16cd6 commit 2ccc530
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
name: After Tests
command: |
. venv/bin/activate
ls -ltra tests/reports/
tox -e docs
codeclimate-test-reporter --token $CC_TEST_REPORTER_ID --file .coverage
- store_artifacts:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- click it's reloading an element when param retry=False #208
- class ControlGroup doesn't have reload call and no test #204
- page.get_elements was not parsing ControlGroup classes at calls #205
- py.test arguments calls working at root path while development #220

### Removed
- Old documentation files
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ include *.yml
include LICENSE
include pytest.ini
include tox.ini
include conftest.py
recursive-include logs *.gitkeep
recursive-include qacode *.json
recursive-include tests *.py
Expand Down
Empty file added conftest.py
Empty file.
10 changes: 1 addition & 9 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
[pytest]
addopts =
--verbose
--junit-xml=tests/reports/test_coverage.xml
--html=tests/reports/test_coverage.html
--self-contained-html
--cov=qacode tests/
--cov-report html:tests/reports/coverage/
--cov-report xml:tests/reports/coverage.xml
--benchmark-histogram=tests/reports/benchmarks/benchmark.svg
addopts = --verbose
testpaths = tests
console_output_style = progress
python_files = suite_*_*.py
Expand Down
3 changes: 2 additions & 1 deletion qacode/core/webs/pages/page_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ def get_elements(self, config_controls):
instance = config_control.get("instance")
control = None
try:
if isinstance(instance, (ControlBase, ControlForm, ControlGroup)):
control_types = (ControlBase, ControlForm, ControlGroup)
if isinstance(instance, control_types):
controls.append(control)
else:
raise PageException(
Expand Down
16 changes: 13 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,27 @@ exclude =
.eggs,
.cache

[testenv:benchmark]
description = Environment to generate benchmark image reports
py.test --benchmark-histogram=tests/reports/benchmarks/benchmark.svg
deps =
pytest
pytest-dependency
pytest-benchmark
pytest-benchmark[histogram]

[testenv:coverage]
description = Environment to generate coverage reports
commands =
py.test --self-contained-html --cov=qacode tests/ --cov-report html:tests/reports/coverage/ --cov-report xml:tests/reports/coverage.xml
py.test --cov=qacode tests/ --cov-report html:tests/reports/coverage/ --cov-report xml:tests/reports/coverage.xml
deps =
pytest
pytest-html
pytest-dependency
coverage==4.3.4
pytest-cov==2.5.0
pytest-benchmark
pytest-benchmark[histogram]
coverage==4.3.4
pytest-cov==2.5.0

exclude =
.git,
Expand All @@ -67,3 +76,4 @@ deps =
twine
readme_renderer
Sphinx

0 comments on commit 2ccc530

Please sign in to comment.