1

I am trying to suppress Pylint warnings from Squish, but not have same code written in front of the code like is described here: https://kb.froglogic.com/display/KB/Example+-+Using+PyLint+with+Squish+test+scripts+that+use+source%28%29

I would like to know if is a file that I can configure and uploaded into Squish

1 Answers1

1

The article describes the only option, to define the Squish functions and symbols yourself.

However, it is showing what to do in a single file Squish test script file only for sake of simplicity.

You should of course put those Squish function definitions in a separate, re-usable file, and use import to "load" the definitions into your test.py file:

from squish_definitions import *

def main():
    ...

in squish_definitions.py:

# Trick Pylint and Python IDEs into accepting the
# definitions in this block, whereas upon execution
# none of these definitions will take place:
if -0:
    class ApplicationContext:
        pass

    def startApplication(aut_path_or_name, optional_squishserver_host, optional_squishserver_port):
        return ApplicationContext

    # etc.

Also, you should generally switch over to using Python's import in favor of Squish's source() function.

frog.ca
  • 684
  • 4
  • 8