Skip to content

Commit

Permalink
portrait plot bug fix in python 3 env (#582)
Browse files Browse the repository at this point in the history
* make sure integer number used for reshape array, where python 3 returns integer/integer = float

* fix flake8 tests

* apply suggestion from @doutriaux1

* running tests one a t a time on travis or error logs are mangled
  • Loading branch information
lee1043 authored and doutriaux1 committed Oct 10, 2018
1 parent 3c6d0ae commit 822f5f8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ script:
- git clean -fd
- source activate py3
- python setup.py install
- python run_tests.py -v2
- python run_tests.py -v2 -n1
- source deactivate

#after_success:
Expand Down
2 changes: 1 addition & 1 deletion src/python/graphics/portraits.py
Original file line number Diff line number Diff line change
Expand Up @@ -1939,7 +1939,7 @@ def set_colormap(self):
92.9412,
100)

cols = MV2.reshape(cols, (len(cols) / 3, 3))
cols = MV2.reshape(cols, (len(cols) // 3, 3))

for i in range(cols.shape[0]):
co = self.x.getcolorcell(i)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pmp_flake8.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def testFlake8(self):
print()
print()
cmd = "flake8 --show-source --statistics " +\
"--ignore=F999,F405,E121,E123,E126,E226,E24,E704 " +\
"--ignore=F999,F405,E121,E123,E126,E226,E24,E704,W504 " +\
"--max-line-length=120 %s --exclude %s" % (pth,nopth)
P = subprocess.Popen(shlex.split(cmd),
stdin=subprocess.PIPE,
Expand Down

0 comments on commit 822f5f8

Please sign in to comment.