Skip to content

Commit

Permalink
MAINT - Update tests to comply with flake8 W504
Browse files Browse the repository at this point in the history
This commit updates to comply with the style of [flake8 rule W504](PyCQA/pycodestyle#502)
where previously this code was styled to comply with [flake8 rule W503](https://lintlyci.github.io/Flake8Rules/rules/W503.html)
which has fallen out of favor. W503 is set to be ignored

(cherry picked from commit 0fe98e1)
  • Loading branch information
John Duarte committed Oct 24, 2018
1 parent 015ca3a commit c53da2e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
ignore = E501
ignore = E501,W503
pytest_mark1 = name=test_id
value_match=uuid
enforce_unique_value=true
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ python:
install:
pip install -r requirements.txt
script:
flake8 --ignore E501
flake8 --ignore E501,W503
4 changes: 2 additions & 2 deletions molecule/default/tests/test_hypervisor_free.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_hypervisor_free(host):
assert "vcpus" in stats
assert "vcpus_used" in stats
assert "free_disk_gb" in stats
assert ((stats['memory_mb']) * ram_ratio -
(stats['memory_mb_used'])) / 1024 > 0
assert ((stats['memory_mb']) * ram_ratio
- (stats['memory_mb_used'])) / 1024 > 0
assert (stats['vcpus'] * cpu_ratio - stats['vcpus_used']) > 0
assert (stats['free_disk_gb'] * disk_ratio) > 0

0 comments on commit c53da2e

Please sign in to comment.