-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix working dir detection #282
Fix working dir detection #282
Conversation
Signed-off-by: Carlos Coêlho <carlos@vinta.com.br>
Signed-off-by: Carlos Coêlho <carlos@vinta.com.br>
Signed-off-by: Carlos Coêlho <carlos@vinta.com.br>
Tests are broken but first wanna check the idea of considering the rootpath into the minimal path method. |
Pull Request Test Coverage Report for Build 643
💛 - Coveralls |
@@ -134,7 +134,7 @@ def get_minimal_syspath(self, absolute_paths=True): | |||
if dirname not in packages: | |||
module_list.append(dirname) | |||
|
|||
full_list = sorted(set(module_list) | package_list, key=len) | |||
full_list = sorted(set(module_list) | package_list | {self.rootpath}, key=len) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like the module_list
should already include python files from cwd
but I'm not sure about that. I'll have a play around tomorrow to see why that isn't already happening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any news on that @carlio ?
Signed-off-by: Carlos Coêlho <carlos@vinta.com.br>
1f004c9
to
c6fbc59
Compare
### Update [wheel](https://pypi.org/project/wheel) from **0.32.2** to **0.32.3**. <details> <summary>Changelog</summary> ### 0.32.3 ``` - Fixed compatibility with Python 2.7.0 – 2.7.3 - Fixed handling of direct URL requirements with markers (PR by Benoit Pierre) ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/wheel - Changelog: https://pyup.io/changelogs/wheel/ - Repo: https://github.com/pypa/wheel </details> ### Update [tox](https://pypi.org/project/tox) from **3.5.3** to **3.6.1**. *The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)* <details> <summary>Links</summary> - PyPI: https://pypi.org/project/tox - Docs: https://tox.readthedocs.org/ </details> ### Update [coverage](https://pypi.org/project/coverage) from **4.5.1** to **4.5.2**. *The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)* <details> <summary>Links</summary> - PyPI: https://pypi.org/project/coverage - Changelog: https://pyup.io/changelogs/coverage/ - Repo: https://bitbucket.org/ned/coveragepy </details> ### Update [Sphinx](https://pypi.org/project/Sphinx) from **1.8.1** to **1.8.3**. <details> <summary>Changelog</summary> ### 1.8.3 ``` ============================== Dependencies ------------ Incompatible changes -------------------- Deprecated ---------- Features added -------------- * LaTeX: it is possible to insert custom material to appear on back of title page, see discussion of ``'maketitle'`` key of :confval:`latex_elements` (``'manual'`` docclass only) Bugs fixed ---------- * 5725: mathjax: Use CDN URL for "latest" version by default * 5460: html search does not work with some 3rd party themes * 5520: LaTeX, caption package incompatibility since Sphinx 1.6 * 5614: autodoc: incremental build is broken when builtin modules are imported * 5627: qthelp: index.html missing in QtHelp * 5659: linkcheck: crashes for a hyperlink containing multibyte character * 5754: DOC: Fix some mistakes in :doc:`/latex` * 5810: LaTeX: sphinxVerbatim requires explicit "hllines" set-up since 1.6.6 (refs: 1238) * 5636: C++, fix parsing of floating point literals. * 5496 (again): C++, fix assertion in partial builds with duplicates. * 5724: quickstart: sphinx-quickstart fails when $LC_ALL is empty * 1956: Default conf.py is not PEP8-compliant * 5849: LaTeX: document class ``\maketitle`` is overwritten with no possibility to use original meaning in place of Sphinx custom one * 5834: apidoc: wrong help for ``--tocfile`` * 5800: todo: crashed if todo is defined in TextElement * 5846: htmlhelp: convert hex escaping to decimal escaping in .hhc/.hhk files Testing -------- ``` ### 1.8.2 ``` ===================================== Incompatible changes -------------------- * 5497: Do not include MathJax.js and jsmath.js unless it is really needed Features added -------------- * 5471: Show appropriate deprecation warnings Bugs fixed ---------- * 5490: latex: enumerated list causes a crash with recommonmark * 5492: sphinx-build fails to build docs w/ Python < 3.5.2 * 3704: latex: wrong ``\label`` positioning for figures with a legend * 5496: C++, fix assertion when a symbol is declared more than twice. * 5493: gettext: crashed with broken template * 5495: csv-table directive with file option in included file is broken (refs: 4821) * 5498: autodoc: unable to find type hints for a ``functools.partial`` * 5480: autodoc: unable to find type hints for unresolvable Forward references * 5419: incompatible math_block node has been generated * 5548: Fix ensuredir() in case of pre-existing file * 5549: graphviz Correctly deal with non-existing static dir * 3002: i18n: multiple footnote_references referring same footnote causes duplicated node_ids * 5563: latex: footnote_references generated by extension causes LaTeX builder crashed * 5561: make all-pdf fails with old xindy version * 5557: quickstart: --no-batchfile isn't honored * 3080: texinfo: multiline rubrics are broken * 3080: texinfo: multiline citations are broken ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/sphinx - Changelog: https://pyup.io/changelogs/sphinx/ - Homepage: http://sphinx-doc.org/ </details> ### Update [pytest](https://pypi.org/project/pytest) from **3.9.3** to **4.0.2**. <details> <summary>Changelog</summary> ### 4.0.2 ``` ========================= Bug Fixes --------- - `4265 <https://github.com/pytest-dev/pytest/issues/4265>`_: Validate arguments from the ``PYTEST_ADDOPTS`` environment variable and the ``addopts`` ini option separately. - `4435 <https://github.com/pytest-dev/pytest/issues/4435>`_: Fix ``raises(..., 'code(string)')`` frame filename. - `4500 <https://github.com/pytest-dev/pytest/issues/4500>`_: When a fixture yields and a log call is made after the test runs, and, if the test is interrupted, capture attributes are ``None``. - `4538 <https://github.com/pytest-dev/pytest/issues/4538>`_: Raise ``TypeError`` for ``with raises(..., match=<non-None falsey value>)``. Improved Documentation ---------------------- - `1495 <https://github.com/pytest-dev/pytest/issues/1495>`_: Document common doctest fixture directory tree structure pitfalls ``` ### 4.0.1 ``` ========================= Bug Fixes --------- - `3952 <https://github.com/pytest-dev/pytest/issues/3952>`_: Display warnings before "short test summary info" again, but still later warnings in the end. - `4386 <https://github.com/pytest-dev/pytest/issues/4386>`_: Handle uninitialized exceptioninfo in repr/str. - `4393 <https://github.com/pytest-dev/pytest/issues/4393>`_: Do not create ``.gitignore``/``README.md`` files in existing cache directories. - `4400 <https://github.com/pytest-dev/pytest/issues/4400>`_: Rearrange warning handling for the yield test errors so the opt-out in 4.0.x correctly works. - `4405 <https://github.com/pytest-dev/pytest/issues/4405>`_: Fix collection of testpaths with ``--pyargs``. - `4412 <https://github.com/pytest-dev/pytest/issues/4412>`_: Fix assertion rewriting involving ``Starred`` + side-effects. - `4425 <https://github.com/pytest-dev/pytest/issues/4425>`_: Ensure we resolve the absolute path when the given ``--basetemp`` is a relative path. Trivial/Internal Changes ------------------------ - `4315 <https://github.com/pytest-dev/pytest/issues/4315>`_: Use ``pkg_resources.parse_version`` instead of ``LooseVersion`` in minversion check. - `4440 <https://github.com/pytest-dev/pytest/issues/4440>`_: Adjust the stack level of some internal pytest warnings. ``` ### 4.0.0 ``` ========================= Removals -------- - `3737 <https://github.com/pytest-dev/pytest/issues/3737>`_: **RemovedInPytest4Warnings are now errors by default.** Following our plan to remove deprecated features with as little disruption as possible, all warnings of type ``RemovedInPytest4Warnings`` now generate errors instead of warning messages. **The affected features will be effectively removed in pytest 4.1**, so please consult the `Deprecations and Removals <https://docs.pytest.org/en/latest/deprecations.html>`__ section in the docs for directions on how to update existing code. In the pytest ``4.0.X`` series, it is possible to change the errors back into warnings as a stop gap measure by adding this to your ``pytest.ini`` file: .. code-block:: ini [pytest] filterwarnings = ignore::pytest.RemovedInPytest4Warning But this will stop working when pytest ``4.1`` is released. **If you have concerns** about the removal of a specific feature, please add a comment to `4348 <https://github.com/pytest-dev/pytest/issues/4348>`__. - `4358 <https://github.com/pytest-dev/pytest/issues/4358>`_: Remove the ``::()`` notation to denote a test class instance in node ids. Previously, node ids that contain test instances would use ``::()`` to denote the instance like this:: test_foo.py::Test::()::test_bar The extra ``::()`` was puzzling to most users and has been removed, so that the test id becomes now:: test_foo.py::Test::test_bar This change could not accompany a deprecation period as is usual when user-facing functionality changes because it was not really possible to detect when the functionality was being used explicitly. The extra ``::()`` might have been removed in some places internally already, which then led to confusion in places where it was expected, e.g. with ``--deselect`` (`4127 <https://github.com/pytest-dev/pytest/issues/4127>`_). Test class instances are also not listed with ``--collect-only`` anymore. Features -------- - `4270 <https://github.com/pytest-dev/pytest/issues/4270>`_: The ``cache_dir`` option uses ``$TOX_ENV_DIR`` as prefix (if set in the environment). This uses a different cache per tox environment by default. Bug Fixes --------- - `3554 <https://github.com/pytest-dev/pytest/issues/3554>`_: Fix ``CallInfo.__repr__`` for when the call is not finished yet. ``` ### 3.10.1 ``` ========================== Bug Fixes --------- - `4287 <https://github.com/pytest-dev/pytest/issues/4287>`_: Fix nested usage of debugging plugin (pdb), e.g. with pytester's ``testdir.runpytest``. - `4304 <https://github.com/pytest-dev/pytest/issues/4304>`_: Block the ``stepwise`` plugin if ``cacheprovider`` is also blocked, as one depends on the other. - `4306 <https://github.com/pytest-dev/pytest/issues/4306>`_: Parse ``minversion`` as an actual version and not as dot-separated strings. - `4310 <https://github.com/pytest-dev/pytest/issues/4310>`_: Fix duplicate collection due to multiple args matching the same packages. - `4321 <https://github.com/pytest-dev/pytest/issues/4321>`_: Fix ``item.nodeid`` with resolved symlinks. - `4325 <https://github.com/pytest-dev/pytest/issues/4325>`_: Fix collection of direct symlinked files, where the target does not match ``python_files``. - `4329 <https://github.com/pytest-dev/pytest/issues/4329>`_: Fix TypeError in report_collect with _collect_report_last_write. Trivial/Internal Changes ------------------------ - `4305 <https://github.com/pytest-dev/pytest/issues/4305>`_: Replace byte/unicode helpers in test_capture with python level syntax. ``` ### 3.10.0 ``` ========================== Features -------- - `2619 <https://github.com/pytest-dev/pytest/issues/2619>`_: Resume capturing output after ``continue`` with ``__import__("pdb").set_trace()``. This also adds a new ``pytest_leave_pdb`` hook, and passes in ``pdb`` to the existing ``pytest_enter_pdb`` hook. - `4147 <https://github.com/pytest-dev/pytest/issues/4147>`_: Add ``--sw``, ``--stepwise`` as an alternative to ``--lf -x`` for stopping at the first failure, but starting the next test invocation from that test. See `the documentation <https://docs.pytest.org/en/latest/cache.htmlstepwise>`__ for more info. - `4188 <https://github.com/pytest-dev/pytest/issues/4188>`_: Make ``--color`` emit colorful dots when not running in verbose mode. Earlier, it would only colorize the test-by-test output if ``--verbose`` was also passed. - `4225 <https://github.com/pytest-dev/pytest/issues/4225>`_: Improve performance with collection reporting in non-quiet mode with terminals. The "collecting …" message is only printed/updated every 0.5s. Bug Fixes --------- - `2701 <https://github.com/pytest-dev/pytest/issues/2701>`_: Fix false ``RemovedInPytest4Warning: usage of Session... is deprecated, please use pytest`` warnings. - `4046 <https://github.com/pytest-dev/pytest/issues/4046>`_: Fix problems with running tests in package ``__init__.py`` files. - `4260 <https://github.com/pytest-dev/pytest/issues/4260>`_: Swallow warnings during anonymous compilation of source. - `4262 <https://github.com/pytest-dev/pytest/issues/4262>`_: Fix access denied error when deleting stale directories created by ``tmpdir`` / ``tmp_path``. - `611 <https://github.com/pytest-dev/pytest/issues/611>`_: Naming a fixture ``request`` will now raise a warning: the ``request`` fixture is internal and should not be overwritten as it will lead to internal errors. - `4266 <https://github.com/pytest-dev/pytest/issues/4266>`_: Handle (ignore) exceptions raised during collection, e.g. with Django's LazySettings proxy class. Improved Documentation ---------------------- - `4255 <https://github.com/pytest-dev/pytest/issues/4255>`_: Added missing documentation about the fact that module names passed to filter warnings are not regex-escaped. Trivial/Internal Changes ------------------------ - `4272 <https://github.com/pytest-dev/pytest/issues/4272>`_: Display cachedir also in non-verbose mode if non-default. - `4277 <https://github.com/pytest-dev/pytest/issues/4277>`_: pdb: improve message about output capturing with ``set_trace``. Do not display "IO-capturing turned off/on" when ``-s`` is used to avoid confusion. - `4279 <https://github.com/pytest-dev/pytest/issues/4279>`_: Improve message and stack level of warnings issued by ``monkeypatch.setenv`` when the value of the environment variable is not a ``str``. ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/pytest - Changelog: https://pyup.io/changelogs/pytest/ - Homepage: https://docs.pytest.org/en/latest/ </details> ### Update [prospector[with_everything]](https://pypi.org/project/prospector) from **1.1.4** to **1.1.6.2**. <details> <summary>Changelog</summary> ### 1.1.6.2 ``` - [304](prospector-dev/prospector#304) Pin pylint to 2.1.1 for now as prospector is not compatible with 2.2.0 - [302](prospector-dev/prospector#302) Pin astroid to 2.0.4 as pylint-django and pylint-flask need fixes to be compatible with newer versions ``` ### 1.1.6.1 ``` - [292](prospector-dev/prospector#292) Adding pylint plugin dependencies back and fixing autodetect behaviour. ``` ### 1.1.5 ``` - [283](prospector-dev/prospector#283) Remove unexpected argument from read_config_file - Remove quiet argument - [291](prospector-dev/prospector#291) Update pycodestyle support until 2.4.0 - [280](prospector-dev/prospector#280) Add strict option and fixed emacs output format for mypy tool - [282](prospector-dev/prospector#282) Fix working dir detection ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/prospector - Changelog: https://pyup.io/changelogs/prospector/ - Docs: http://prospector.readthedocs.io </details>
See: #257 (comment)
@carlio how do you feel about it?