Failing Travis tests with Python 2

About the development of the FEM module/workbench.

Moderator: bernd

Post Reply
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Failing Travis tests with Python 2

Post by vocx »

I remember somebody made some changes to the code recently, but I can't identify what changed exactly.

This is the error. It only fails with Python 2. All other tests in Python 3 GCC, Clang, and Windows pass.

https://travis-ci.org/FreeCAD/FreeCAD/b ... hub_status

https://travis-ci.org/FreeCAD/FreeCAD/j ... 348-L10363

Code: Select all

======================================================================
FAIL: test_static_material_nonlinar (femtest.app.test_ccxtools.TestCcxTools)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/Mod/Fem/femtest/app/test_ccxtools.py", line 194, in test_static_material_nonlinar
    analysis_dir=analysis_dir,
  File "/usr/local/Mod/Fem/femtest/app/test_ccxtools.py", line 309, in input_file_writing_test
    "ccxtools write_inp_file test failed.\n{}".format(ret)
AssertionError: ccxtools write_inp_file test failed.
Comparing /usr/local/Mod/Fem/femtest/data/ccx/mat_nonlinear.inp to /tmp/FEM_unittests/FEM_ccx_matnonlinear/Mesh.inp failed!
--- 
+++ 
@@ -19855 +19854,0 @@
-1274,
@@ -19910,0 +19910 @@
+1274,
Last edited by vocx on Fri Jan 31, 2020 5:36 pm, edited 1 time in total.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Failing Travis tests with Python 2

Post by bernd »

I will have a look tomorrow. Can do this on windows download dev build only. Since I only compile myself on Linux with Py3.

bernd
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Failing Travis tests with Python 2

Post by bernd »

seams this commit git commit 085bce37
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Failing Travis tests with Python 2

Post by bernd »

temporary deactivated this test git commit b8e2ebd hope this helps ATM

bernd
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Failing Travis tests with Python 2

Post by bernd »

reactivated for py3 git commit b18b8a8
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Failing Travis tests with Python 2

Post by bernd »

to run only this test use outside FreeCAD:

Code: Select all

./bin/FreeCADCmd --run-test "femtest.app.test_ccxtools.TestCcxTools.test_static_material_nonlinar"
or inside FreeCAD:

Code: Select all

import unittest
unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName("femtest.app.test_ccxtools.TestCcxTools.test_static_material_nonlinar"))

someone out there who has a Py2 build available?
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Failing Travis tests with Python 2

Post by bernd »

comment for myself to not forget ...

a possibility to make this more robust would be to use sorted node sets ... https://github.com/FreeCAD/FreeCAD/blob ... se.py#L131
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Failing Travis tests with Python 2

Post by bernd »

User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Failing Travis tests with Python 2

Post by bernd »

master is broken, thus the PR is broken too. I will wait until master is fixed and rebase than ...
Post Reply