SublimeText / UnitTesting

Testing Sublime Text Packages
MIT License
112 stars 32 forks source link

The process is hanging when using .coveragerc with include or source setting #136

Open evandrocoan opened 6 years ago

evandrocoan commented 6 years ago

This is a build result without specifying the include setting with .coveragerc:

  1. https://ci.appveyor.com/project/evandrocoan/pythondebugtools/build/job/sv5bkd8110pbx86o

This is a build where I specified the include setting:

  1. https://ci.appveyor.com/project/evandrocoan/pythondebugtools/builds/19475948/job/l7n8b10ucl1mwgr6

Took me several hours until nail it down to this. I even modified the test_coverage.py adding a setting for the include directory:

  1. https://github.com/evandroforks/UnitTesting/commit/df1d57892920563d806ffde3183388f818e03276

And it still hanging on the same place, whether the setting is passed by unittesting.json or by .coveragerc. This only happens for the Sublime Text build. Build for other python versions work fine: image

After experimenting, I notice it always hang on the penultimate test. For example, If there are 10 tests it will hang on the 9th test. If I remove 1 test, then it will hang on the 8th.

I even had modified the UnitTesting AppVeyor script adding a lot of prints, but it shows there is nothing to do with the powershell:

  1. https://ci.appveyor.com/project/evandrocoan/pythondebugtools/builds/19471148/job/224gt46h8qv0kq6a

Apart this issue, I am trying to set the include setting because codecov is not finding my source code under all/debug_tools directory:

  1. image
  2. https://codecov.io/gh/evandrocoan/DebugTools

Codecov thinks that the only source on the repository is the file setup.py.

evandrocoan commented 6 years ago

As my library a python dependency, I removed coverage from Sublime Text to a exclusive job on the appveyor.yml (COVERAGE which runs Python 3.6), now everything is passing:

  1. https://ci.appveyor.com/project/evandrocoan/pythondebugtools/builds/19479604
  2. image
randy3k commented 6 years ago

I have no idea what you are trying to demonstrate....

evandrocoan commented 6 years ago

Using the include setting for coverage blocks the unit tests from completing.

evandrocoan commented 6 years ago

If I understand correctly, this issue is also caused by:

  1. https://github.com/SublimeText/UnitTesting/issues/137 Build passing on Mac OS but falling for Linux with: Unit Testing pc_helper(), missing dependencies: {'coverage'}

Where coverage dependency was being deleted.

evandrocoan commented 6 years ago

I actually, it cannot be otherwise the unit tests would not start running and would fail with the same error as the other issue.

I think it could be because the coverage dependency is out of date, because when running it outside Sublime Text and installing the coverage dependency with pip install coverage, no errors are reported and everything runs fine.