diff --git a/.github/workflows/smoke_tests.yml b/.github/workflows/smoke_tests.yml index acf94f8..2a2848a 100644 --- a/.github/workflows/smoke_tests.yml +++ b/.github/workflows/smoke_tests.yml @@ -30,10 +30,10 @@ jobs: run: python -m pip install --upgrade pip - name: Install deps run: pip install -U -e .[n2] - if: runner.os != "Windows" + if: ${{ runner.os != 'Windows' }} - name: Install deps without n2 run: pip install -U -e . - if: runner.os = "Windows" + if: ${{ runner.os == 'Windows' }} - name: Run renderers on examples run: | cd examples diff --git a/examples/render.py b/examples/render.py index bb52d69..8656cfe 100644 --- a/examples/render.py +++ b/examples/render.py @@ -61,7 +61,11 @@ basedir.mkdir(exist_ok=True, parents=True) for opt_name, opt in optimizers.items(): s = time.time() - renderer.render_terminal(img_path, (basedir/opt_name).with_suffix('.txt'), optimizer=opt) + file = (basedir / opt_name).with_suffix('.txt') + if os.name == 'nt': + # Windows runners seem strange + file = file.open(mode='w', encoding='utf-16') + renderer.render_terminal(img_path, file, optimizer=opt) e = time.time() img_fn = (basedir/opt_name).with_suffix('.png') renderer.prerender(img_path, optimizer=opt).save(img_fn)