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

Option to skip certain tests #102

Open
Gunni opened this issue Oct 21, 2019 · 6 comments
Open

Option to skip certain tests #102

Gunni opened this issue Oct 21, 2019 · 6 comments

Comments

@Gunni
Copy link

Gunni commented Oct 21, 2019

Hey,

I'm not using dot at all, and my CI system gets this error:

======================================================================
ERROR: test_dotexport.test_tree_png
Tree to png.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/xKi9Azf8/rpms/python-anytree/rpmbuild/BUILD/anytree-2.6.0/.eggs/nose-1.3.7-py3.6.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/tmp/xKi9Azf8/rpms/python-anytree/rpmbuild/BUILD/anytree-2.6.0/tests/test_dotexport.py", line 84, in test_tree_png
    RenderTreeGraph(root).to_picture(join(GENPATH, "tree1.png"))
  File "/tmp/xKi9Azf8/rpms/python-anytree/rpmbuild/BUILD/anytree-2.6.0/anytree/exporter/dotexporter.py", line 232, in to_picture
    check_call(cmd)
  File "/usr/lib64/python3.6/subprocess.py", line 306, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib64/python3.6/subprocess.py", line 287, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib64/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'dot': 'dot'

======================================================================
ERROR: test_dotexporter.test_tree_png
Tree to png.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/xKi9Azf8/rpms/python-anytree/rpmbuild/BUILD/anytree-2.6.0/.eggs/nose-1.3.7-py3.6.egg/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/tmp/xKi9Azf8/rpms/python-anytree/rpmbuild/BUILD/anytree-2.6.0/tests/test_dotexporter.py", line 112, in test_tree_png
    DotExporter(root).to_picture(join(GENPATH, "tree1.png"))
  File "/tmp/xKi9Azf8/rpms/python-anytree/rpmbuild/BUILD/anytree-2.6.0/anytree/exporter/dotexporter.py", line 232, in to_picture
    check_call(cmd)
  File "/usr/lib64/python3.6/subprocess.py", line 306, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib64/python3.6/subprocess.py", line 287, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib64/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'dot': 'dot'

----------------------------------------------------------------------
Ran 76 tests in 0.106s

FAILED (errors=2)
Test failed: <unittest.runner.TextTestResult run=76 errors=2 failures=0>
error: Test failed: <unittest.runner.TextTestResult run=76 errors=2 failures=0>
error: Bad exit status from /var/tmp/rpm-tmp.xpP9kw (%check)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.xpP9kw (%check)

I'm building it using an rpm spec file and this section is failing:

%check
%{__python3} setup.py test
@c0fec0de
Copy link
Owner

c0fec0de commented Dec 8, 2019

I would recommend, to add graphviz to the RPM dependencies. So dot will be there. As the dotexport is quite famous, it would be good to keep it included.

@jtojnar
Copy link

jtojnar commented Dec 14, 2019

The issue is that graphviz depends on pango, which depends on glib, which depends on gtk-doc, which depends on anytree.

Would it make sense to move anytree exporters into a separate packages?

@c0fec0de
Copy link
Owner

c0fec0de commented Dec 14, 2019 via email

@jtojnar
Copy link

jtojnar commented Dec 14, 2019

Would it make sense to move anytree exporters into a separate packages? That way we can still hhave this tested and break the dependency cycles.

@c0fec0de
Copy link
Owner

yes. May take a moment.

@c0fec0de
Copy link
Owner

The idea is to have a anytreelib project, which only includes the anytree core functionality as you need it.
anytree will stay as is, as many users make use of the importers and exporters.
anytree may then depend on anytreelib. Just not sure if this might frustrate users, as anytree tried to keep the deps to zero (except six).

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

No branches or pull requests

3 participants