Skip to content

Commit

Permalink
Fix pipeline (#160)
Browse files Browse the repository at this point in the history
* Rename variable to satisfy flake8

* Fix and expand python version matrix

* Rename more variables

* Remove python3.5
  • Loading branch information
rogiervandergeer committed Jan 12, 2021
1 parent 489b341 commit 8b27bc7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ stages:
- job: TestJob
strategy:
matrix:
Python35:
python.version: '3.6'
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
Python38:
python.version: '3.8'
steps:
- task: UsePythonVersion@0
inputs:
Expand Down
4 changes: 2 additions & 2 deletions evol/helpers/combiners/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

def construct_neighbors(*chromosome: Tuple[Any]) -> defaultdict:
result = defaultdict(set)
for l in chromosome:
for x, y in _neighbors_in(l):
for element in chromosome:
for x, y in _neighbors_in(element):
result[x].add(y)
result[y].add(x)
return result
Expand Down
4 changes: 2 additions & 2 deletions tests/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ def test_baselogger_can_accept_kwargs(self, tmpdir, simple_chromosomes, simple_e
logger.log(pop, foo="bar")
with open(log_file, "r") as f:
assert len(f.readlines()) == len(simple_chromosomes)
assert all(["bar" in l for l in f.readlines()])
assert all(["bar" in line for line in f.readlines()])
# we should see that a file was created with an appropriate number of rows
logger.log(pop, foo="meh")
with open(log_file, "r") as f:
assert len(f.readlines()) == (2 * len(simple_chromosomes))
assert all(['meh' in l for l in f.readlines()[-10:]])
assert all(['meh' in line for line in f.readlines()[-10:]])

def test_baselogger_works_via_evolution_callback(self, tmpdir, capsys):
log_file = tmpdir.join('log.txt')
Expand Down

0 comments on commit 8b27bc7

Please sign in to comment.