Best Python code snippet using autotest_python
test_jobs.py
Source:test_jobs.py  
...13    "wptrunner_unittest",14}15default_jobs = {"lint", "manifest_upload"}16def test_all():17    assert jobs.get_jobs(["README.md"], all=True) == all_jobs18def test_default():19    assert jobs.get_jobs(["README.md"]) == default_jobs20def test_testharness():21    assert jobs.get_jobs(["resources/testharness.js"]) == default_jobs | {"resources_unittest",22                                                                          "wptrunner_infrastructure"}23    assert jobs.get_jobs(["resources/testharness.js"],24                         includes=["resources_unittest"]) == {"resources_unittest"}25    assert jobs.get_jobs(["tools/wptserve/wptserve/config.py"],26                         includes=["resources_unittest"]) == {"resources_unittest"}27    assert jobs.get_jobs(["foo/resources/testharness.js"],28                         includes=["resources_unittest"]) == set()29def test_stability():30    assert jobs.get_jobs(["dom/historical.html"],31                         includes=["stability"]) == {"stability"}32    assert jobs.get_jobs(["tools/pytest.ini"],33                         includes=["stability"]) == set()34    assert jobs.get_jobs(["serve"],35                         includes=["stability"]) == set()36    assert jobs.get_jobs(["resources/testharness.js"],37                         includes=["stability"]) == set()38    assert jobs.get_jobs(["docs/.gitignore"],39                         includes=["stability"]) == set()40    assert jobs.get_jobs(["dom/tools/example.py"],41                         includes=["stability"]) == set()42    assert jobs.get_jobs(["conformance-checkers/test.html"],43                         includes=["stability"]) == set()44    assert jobs.get_jobs(["dom/README.md"],45                         includes=["stability"]) == set()46    assert jobs.get_jobs(["css/build-css-testsuite.sh"],47                         includes=["stability"]) == set()48    assert jobs.get_jobs(["css/CSS21/test-001.html"],49                         includes=["stability"]) == {"stability"}50    assert jobs.get_jobs(["css/build-css-testsuite.sh",51                          "css/CSS21/test-001.html"],52                         includes=["stability"]) == {"stability"}53def test_affected_tests():54    assert jobs.get_jobs(["dom/historical.html"],55                         includes=["affected_tests"]) == {"affected_tests"}56    assert jobs.get_jobs(["tools/pytest.ini"],57                         includes=["affected_tests"]) == set()58    assert jobs.get_jobs(["serve"],59                         includes=["affected_tests"]) == set()60    assert jobs.get_jobs(["resources/testharness.js"],61                         includes=["affected_tests"]) == set()62    assert jobs.get_jobs(["docs/.gitignore"],63                         includes=["affected_tests"]) == set()64    assert jobs.get_jobs(["dom/tools/example.py"],65                         includes=["affected_tests"]) == set()66    assert jobs.get_jobs(["conformance-checkers/test.html"],67                         includes=["affected_tests"]) == set()68    assert jobs.get_jobs(["dom/README.md"],69                         includes=["affected_tests"]) == set()70    assert jobs.get_jobs(["css/build-css-testsuite.sh"],71                         includes=["affected_tests"]) == set()72    assert jobs.get_jobs(["css/CSS21/test-001.html"],73                         includes=["affected_tests"]) == {"affected_tests"}74    assert jobs.get_jobs(["css/build-css-testsuite.sh",75                          "css/CSS21/test-001.html"],76                         includes=["affected_tests"]) == {"affected_tests"}77    assert jobs.get_jobs(["resources/idlharness.js"],78                         includes=["affected_tests"]) == {"affected_tests"}79def test_tools_unittest():80    assert jobs.get_jobs(["tools/ci/test/test_jobs.py"],81                         includes=["tools_unittest"]) == {"tools_unittest"}82    assert jobs.get_jobs(["dom/tools/example.py"],83                         includes=["tools_unittest"]) == set()84    assert jobs.get_jobs(["dom/historical.html"],85                         includes=["tools_unittest"]) == set()86def test_wptrunner_unittest():87    assert jobs.get_jobs(["tools/wptrunner/wptrunner/wptrunner.py"],88                         includes=["wptrunner_unittest"]) == {"wptrunner_unittest"}89    assert jobs.get_jobs(["tools/example.py"],90                         includes=["wptrunner_unittest"]) == {"wptrunner_unittest"}91def test_build_css():92    assert jobs.get_jobs(["css/css-build-testsuites.sh"],93                         includes=["build_css"]) == {"build_css"}94    assert jobs.get_jobs(["css/CSS21/test.html"],95                         includes=["build_css"]) == {"build_css"}96    assert jobs.get_jobs(["html/css/CSS21/test.html"],97                         includes=["build_css"]) == set()98def test_update_built():99    assert jobs.get_jobs(["html/canvas/element/foo.html"],100                         includes=["update_built"]) == {"update_built"}101    assert jobs.get_jobs(["html/foo.html"],102                         includes=["update_built"]) == {"update_built"}103    assert jobs.get_jobs(["html/canvas/offscreen/foo.html"],104                         includes=["update_built"]) == {"update_built"}105def test_wpt_integration():106    assert jobs.get_jobs(["tools/wpt/wpt.py"],107                         includes=["wpt_integration"]) == {"wpt_integration"}108    assert jobs.get_jobs(["tools/wptrunner/wptrunner/wptrunner.py"],109                         includes=["wpt_integration"]) == {"wpt_integration"}110def test_wpt_infrastructure():111    assert jobs.get_jobs(["tools/hammer.html"],112                         includes=["wptrunner_infrastructure"]) == {"wptrunner_infrastructure"}113    assert jobs.get_jobs(["infrastructure/assumptions/ahem.html"],114                         includes=["wptrunner_infrastructure"]) == {"wptrunner_infrastructure"}115def test_wdspec_support():116    assert jobs.get_jobs(["webdriver/tests/support/__init__.py"],...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!!
