Skip to content
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 python test-packer #1654

Merged
merged 4 commits into from
Apr 12, 2019
Merged

Fix python test-packer #1654

merged 4 commits into from
Apr 12, 2019

Conversation

kalbasit
Copy link
Contributor

@kalbasit kalbasit commented Apr 1, 2019

Over on nixpkgs, I noticed the build for js-beautify is failing after we've updated from 1.7.5 to 1.8.6. In 1.8.0rc2, python/jsbeautifier/tests/test-packer.py was added, pytest is not liking the name test_str. It complains about not finding the str fixture.

$ cd python
$ nix run '(with import <nixpkgs> {}; python36.withPackages(ps: with ps; [ setuptools pytest ]))' -c python setup.py test
running test
Searching for editorconfig>=0.12.0
Best match: EditorConfig 0.12.2
Processing EditorConfig-0.12.2-py3.6.egg

Using /yl/code/opensource/base/src/github.com/beautify-web/js-beautify/python/.eggs/EditorConfig-0.12.2-py3.6.egg
running egg_info
writing jsbeautifier.egg-info/PKG-INFO
writing dependency_links to jsbeautifier.egg-info/dependency_links.txt
writing entry points to jsbeautifier.egg-info/entry_points.txt
writing requirements to jsbeautifier.egg-info/requires.txt
writing top-level names to jsbeautifier.egg-info/top_level.txt
reading manifest file 'jsbeautifier.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'js-beautify'
writing manifest file 'jsbeautifier.egg-info/SOURCES.txt'
running build_ext
================================================================================================================ test session starts ================================================================================================================
platform linux -- Python 3.6.8, pytest-3.7.4, py-1.5.4, pluggy-0.7.1
rootdir: /yl/code/opensource/base/src/github.com/beautify-web/js-beautify/python, inifile:
collected 3 items

jsbeautifier/tests/testindentation.py ..                                                                                                                                                                                                      [ 66%]
jsbeautifier/tests/test-packer.py E                                                                                                                                                                                                           [100%]

====================================================================================================================== ERRORS =======================================================================================================================
____________________________________________________________________________________________________________ ERROR at setup of test_str _____________________________________________________________________________________________________________
file /yl/code/opensource/base/src/github.com/beautify-web/js-beautify/python/jsbeautifier/tests/test-packer.py, line 11
  def test_str(str, expected):
E       fixture 'str' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_xml_attribute, record_xml_property, recwarn, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/yl/code/opensource/base/src/github.com/beautify-web/js-beautify/python/jsbeautifier/tests/test-packer.py:11
========================================================================================================= 2 passed, 1 error in 0.05 seconds =========================================================================================================

@flokli
Copy link

flokli commented Apr 7, 2019

Added this patch on top of our package derivation in nixpkgs, can confirm it fixes the issue. Would love to see this merged, so we can stop applying patches on top of the latest release :-)

@bitwiseman
Copy link
Member

@flokli @kalbasit
Thanks for the PR.

@bitwiseman
Copy link
Member

@kalbasit @flokli
Turns out that file shouldn't even be there. 😄

@kalbasit
Copy link
Contributor Author

@bitwiseman thank you for taking care of this one.

@bitwiseman bitwiseman merged commit 08c18a5 into beautifier:master Apr 12, 2019
@kalbasit kalbasit deleted the nixpkgs_fix-js-beautifier branch April 13, 2019 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants