Best Python code snippet using autotest_python
setup.py
Source: setup.py
...90 _fix_data_paths(scheduler.setup.get_package_data()),91 _fix_data_paths(database_legacy.setup.get_package_data()),92 _fix_data_paths(utils.setup.get_package_data())93 ])94def get_scripts():95 return (client.setup.get_scripts() +96 frontend.setup.get_scripts() +97 cli.setup.get_scripts() +98 server.setup.get_scripts() +99 scheduler.setup.get_scripts() +100 database_legacy.setup.get_scripts() +101 tko.setup.get_scripts() +102 installation_support.setup.get_scripts())103def run():104 setup(name='autotest',105 description='Autotest test framework',106 maintainer='Lucas Meneghel Rodrigues',107 maintainer_email='lmr@redhat.com',108 version=version.get_version(),109 url='http://autotest.github.com',110 package_dir=get_package_dir(),111 package_data=get_package_data(),112 packages=get_packages(),113 scripts=get_scripts(),114 data_files=get_data_files(),115 cmdclass=cmdclass,116 command_options=command_options,117 include_package_data=True,118 )119if __name__ == '__main__':...
test_html.py
Source: test_html.py
...3class TestScriptFinder(unittest.TestCase):4 def test_exist(self):5 finder = html.ScriptFinder()6 finder.feed("<script>var abc = true;</script>")7 scripts = finder.get_scripts()8 self.assertEqual(scripts, ["var abc = true;"])9 def test_exist_uppercase(self):10 finder = html.ScriptFinder()11 finder.feed("<SCRIPT>var abc = true;</SCRIPT>")12 scripts = finder.get_scripts()13 self.assertEqual(scripts, ["var abc = true;"])14 def test_exist_multiline(self):15 finder = html.ScriptFinder()16 finder.feed("<script>\nvar abc = true;\nvar def = false;\n</script>")17 scripts = finder.get_scripts()18 self.assertEqual(scripts, ["\nvar abc = true;\nvar def = false;\n"])19 def test_exist_attrs(self):20 finder = html.ScriptFinder()21 finder.feed('<script language="javascript" type="text/javascript">var abc = true;</script>')22 scripts = finder.get_scripts()23 self.assertEqual(scripts, ["var abc = true;"])24 def test_exist_empty(self):25 finder = html.ScriptFinder()26 finder.feed("<script>\n</script>")27 scripts = finder.get_scripts()28 self.assertEqual(scripts, [])29 def test_exist_src(self):30 finder = html.ScriptFinder()31 finder.feed('<script language="javascript" src="../dynaform/common.js" type="text/javascript"></script>')32 scripts = finder.get_scripts()33 self.assertEqual(scripts, [])34 def test_exist_multiple(self):35 finder = html.ScriptFinder()36 finder.feed("""37 <script>var abc = true;</script>38 <script>var def = false;</script>39 """)40 scripts = finder.get_scripts()41 self.assertEqual(scripts, ["var abc = true;", "var def = false;"])42 def test_exist_other_tags(self):43 finder = html.ScriptFinder()44 finder.feed(""",45 <title>Some scripts here</title>46 <script>var abc = true;</script>47 <meta charset="utf-8">48 <script>var def = false;</script>49 <script language="javascript" src="../dynaform/common.js" type="text/javascript"></script>50 """)51 scripts = finder.get_scripts()52 self.assertEqual(scripts, ["var abc = true;", "var def = false;"])53 def test_exist_not_closed(self):54 finder = html.ScriptFinder()55 finder.feed('<script>var abc = "true";')56 scripts = finder.get_scripts()57 self.assertEqual(scripts, [])58 def test_not_exist(self):59 finder = html.ScriptFinder()60 finder.feed("""61 <title>No scripts here</title>62 <meta charset="utf-8">63 """)64 scripts = finder.get_scripts()65 self.assertEqual(scripts, [])66 def test_clear(self):67 finder = html.ScriptFinder()68 finder.feed("""69 <script>var abc = true;</script>70 <script>var def = false;</script>71 """)72 finder.close()73 finder.feed("""74 <title>No scripts here</title>75 <meta charset="utf-8">76 """)77 scripts = finder.get_scripts()...
Check out the latest blogs from LambdaTest on this topic:
Before we discuss Scala testing, let us understand the fundamentals of Scala and how this programming language is a preferred choice for your development requirements.The popularity and usage of Scala are rapidly rising, evident by the ever-increasing open positions for Scala developers.
So, now that the first installment of this two fold article has been published (hence you might have an idea of what Agile Testing is not in my opinion), I’ve started feeling the pressure to explain what Agile Testing actually means to me.
Did you know that according to Statista, the number of smartphone users will reach 18.22 billion by 2025? Let’s face it, digital transformation is skyrocketing and will continue to do so. This swamps the mobile app development market with various options and gives rise to the need for the best mobile app testing tools
As a developer, checking the cross browser compatibility of your CSS properties is of utmost importance when building your website. I have often found myself excited to use a CSS feature only to discover that it’s still not supported on all browsers. Even if it is supported, the feature might be experimental and not work consistently across all browsers. Ask any front-end developer about using a CSS feature whose support is still in the experimental phase in most prominent web browsers. ????
The count of mobile users is on a steep rise. According to the research, by 2025, it is expected to reach 7.49 billion users worldwide. 70% of all US digital media time comes from mobile apps, and to your surprise, the average smartphone owner uses ten apps per day and 30 apps each month.
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!