Rockhopper-Technologies / enlighten

Enlighten Progress Bar for Python Console Apps
https://python-enlighten.readthedocs.io
Mozilla Public License 2.0
416 stars 25 forks source link

add appveyor CI config #7

Closed Borda closed 5 years ago

Borda commented 5 years ago

later also add the badge (using mine just for this branch Build status ) see sample https://github.com/ogrisel/python-appveyor-demo/blob/master/appveyor.yml

codecov[bot] commented 5 years ago

Codecov Report

Merging #7 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master     #7   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           4      4           
  Lines         414    414           
  Branches       82     82           
=====================================
  Hits          414    414

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1dfa0d4...3436435. Read the comment docs.

Borda commented 5 years ago
python --version
Python 2.7.16
pip --version
pip 19.2.3 from c:\python27-x64\lib\site-packages\pip (python 2.7)

but later

You are using pip version 8.1.1, however version 19.2.3 is available.

See:

avylove commented 5 years ago

I'm glad you got your build working. And I do think Enlighten needs some testing on Windows, but I think you're missing the goal here. Adding an Appveyor config is pretty easy, the hard part is coming up with relevant tests to run on Windows. Most of the testing involves creating PTYs which is easy on Linux, but the capability was just added to Windows 10 a year ago (It's also in Server 2019). So the options are to make the current tests work by figuring out how to use a similar capability and run the tests on Server 2019 or create a general use test essentially to make sure nothing breaks. Probably both would be good to have in the longer term, though a general use test would be easier to implement in the short term. Perhaps running one of the example scripts would be sufficient.

If you're going to work on this, that would be awesome, otherwise I'll add it to my todo list and close this PR.

Borda commented 5 years ago

Well, I have started with adding working config and it seems that the tests are not passing so I was wondering if you are going to fix them before we would add another test...

ERROR: test_counter (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_counter
Traceback (most recent call last):
  File "c:\python35-x64\Lib\unittest\loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "c:\python35-x64\Lib\unittest\loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "C:\projects\enlighten\tests\test_counter.py", line 19, in <module>
    from tests import TestCase, mock, MockManager, MockTTY, MockCounter, MockBaseCounter
  File "C:\projects\enlighten\tests\__init__.py", line 13, in <module>
    import fcntl
ImportError: No module named 'fcntl'
avylove commented 5 years ago

As explained before, the tests aren't broken, they use lower level Linux calls to create a pseudo terminal. They weren't designed to run on Windows and making them run on Windows is not a minor effort. A basic functionality test would be the place to start rather than trying to run the whole test suite. So if you'd like to tackle that, it would be appreciated, but otherwise I think this request is putting the cart before the horse.