sublime-robot-framework-assistant icon indicating copy to clipboard operation
sublime-robot-framework-assistant copied to clipboard

Py3 support + changes for new RBFW and SeleniumLibrary by aaltat

Open idxn opened this issue 6 years ago • 10 comments

Move to Python3. Drop support of python2 because python2 will be end of life in the year of 2019 so it would be better to move forward.

  • convert to py3 using 2to3 script
  • use the latest RBFW and SeleniumLibrary for unit/acceptance test
  • Fix some of the typos

idxn avatar Feb 16 '19 17:02 idxn

Strange. The unittest on my windows machine has passed. I'll go checking with OSX again

idxn avatar Feb 16 '19 17:02 idxn

Well, it does look pretty good. There is only one failure in the Python 3.6.

@andriyko should we give him the push rights or what we should do?

aaltat avatar Feb 17 '19 09:02 aaltat

I had one comment. In some point it would be vice to fix the tests. too

aaltat avatar Feb 21 '19 16:02 aaltat

Sure, i'll try to get it fixed

idxn avatar Feb 22 '19 08:02 idxn

@andriyko @aaltat Do I need to get all the unittest fixed or just the one in py3.6 to get this pull merged?

idxn avatar Feb 25 '19 07:02 idxn

@aaltat @andriyko I have taken a look and find my suspect. In testdata, resource file importing in 'test\resource\test_data\real_suite\resource\resource1\real_suite_resource.robot' does not exist in the project as follow:

Resource ../../resource2/real_suite_resource.robot

If it's intended to, the reason it fails on unix based system is that the order of the queue list is not the same as windows. In windows, it's like this:

[SeleniumLibrary, xxx, ../../resource2/real_suite_resource.robot]

On the other hand, in unix based system, it's like this:

[ ../../resource2/real_suite_resource.robot, xxx, SeleniumLibrary]

Currently, our implementation will raise an exception if it cannot find the file so it won't parse any files in the latter. It causes our unit test to fail. If we intends to use the test data like this for specific reason, I'll need to make the changes to continue parse the file in the queue so the test_scanner.TestScanner.test_queue_populated unittest will pass and it quite makes sense for me that the scanner should not stop a scanning process because of non-existing file.

idxn avatar Feb 25 '19 16:02 idxn

Please ignore the first comment. It misunderstood something :( I'll take a look again.

idxn avatar Feb 26 '19 04:02 idxn

I am having a flu and laying in the bed. I will take a look later.

aaltat avatar Feb 26 '19 11:02 aaltat

Take some rest. I'm not in rush though. I'll try to get it resolve on my own.

idxn avatar Feb 26 '19 16:02 idxn

Well, I am pretty happy with the changes. Although looking in to why those test fails would be good to go .

aaltat avatar Mar 01 '19 21:03 aaltat