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

test_lattice.py File2jsonTest fails on Python 2.7.12 #2

Open
smartsammler opened this issue Oct 7, 2016 · 5 comments
Open

test_lattice.py File2jsonTest fails on Python 2.7.12 #2

smartsammler opened this issue Oct 7, 2016 · 5 comments

Comments

@smartsammler
Copy link
Collaborator

test_lattice.py fails with the File2jsonTest.
The JSON outputs/files differ in the following point:

1095d1094
<     "_epics": {},
1097,1098c1096,1097
<         "% 0 sto csr_on_off",
<         "% 0 sto lsc_on_off"

---
>         "% 0.0 sto csr_on_off",
>         "% 0.0 sto lsc_on_off"

Firstly the "_epics": {} is missing in the reference/test JSON and secondly the 0 is float and not string.

@zhangt58
Copy link
Owner

zhangt58 commented Oct 10, 2016

The reference JSON file should have be updated, some of the test scripts are relatively old, I may forgot to update them in time, however the scripts in 'contrib' folder are ready to use.

@smartsammler
Copy link
Collaborator Author

The file jfile_new.json is not in the repo, yet.

@zhangt58
Copy link
Owner

zhangt58 commented Nov 1, 2016

I've uploaded that file now.

@smartsammler
Copy link
Collaborator Author

Now I get another error:

python test_lattice.py

..F..

FAIL: runTest (main.GetAllKwsTest)

Traceback (most recent call last):
File "test_lattice.py", line 80, in runTest
self.assertEqual(kws_ele, [u'DS1FH', u'DP3FH', u'W03', u'DP2SH', u'A4P', u'DBLL5', u'DBLL4', u'DBLL3', u'DBLL2', u'DBLL1', u'BPM02', u'BPM03', u'DP5FH', u'BPM01', u'DBD', u'DVALV', u'B0', u'DP1FH', u'B13', u'DBDM', u'A4E', u'W08', u'W09', u'W04', u'W05', u'W06', u'W07', u'W00', u'W01', u'W02', u'A4I', u'WA1E', u'WA1I', u'DP3SH', u'PRL2', u'PRL3', u'PRL1', u'PRL6', u'PRL7', u'PRL4', u'PRL5', u'DP6SH', u'DP4SH', u'Q03', u'_prefixstr', u'Q', u'WA2E', u'WA3P', u'Q05', u'A2P', u'DP2FH', u'B14', u'B12', u'A2E', u'B11', u'A2I', u'DB14', u'DB11', u'DB13', u'DB12', u'DF5', u'DF4', u'DF1', u'DF3', u'DF2', u'WA3I', u'Q10', u'WA3E', u'A3P', u'A3E', u'A3I', u'DP5SH', u'DP6FH', u'WA2P', u'Q08', u'Q09', u'WA2I', u'Q02', u'DP1SH', u'Q01', u'Q06', u'Q07', u'Q04', u'DP4FH', u'DS1SH', u'DQD1', u'DQD3', u'DQD2', u'PF1', u'PF2', u'PSTN2', u'DBPM1', u'DBPM2', u'DBPM3', u'DAM', u'PSTN1', u'A1P', u'A1E', u'WA1P', u'A1I', u'WA4I', u'WA4E', u'D2', u'DICT', u'WA4P', u'D3', u'D1'])
AssertionError: Lists differ: [u'DS1FH', u'DP3FH', u'W03', u... != [u'DS1FH', u'DP3FH', u'W03', u...

First differing element 18:
u'A2E'
u'B13'

Second list contains 1 additional elements.
First extra element 106:
u'D1'

Diff is 1352 characters long. Set self.maxDiff to None to see it.


Ran 5 tests in 0.283s

FAILED (failures=1)

@zhangt58
Copy link
Owner

zhangt58 commented Nov 2, 2016

I think you can ignore this error, because you were trying to diff two strings that are too long, the test script should be adjusted.

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

2 participants