Best Python code snippet using refurb_python
test_checks.py
Source:test_checks.py
...45 assert errors == [46 "refurb: There are no .py[i] files in directory 'test/e2e/empty_package'"47 ]48DISABLED_CHECK = "test.custom_checks.disabled_check"49def test_disabled_check_is_not_ran_by_default() -> None:50 errors = run_refurb(51 Settings(files=["test/e2e/dummy.py"], load=[DISABLED_CHECK])52 )53 assert not errors54def test_disabled_check_ran_if_explicitly_enabled() -> None:55 errors = run_refurb(56 Settings(57 files=["test/e2e/dummy.py"],58 load=[DISABLED_CHECK],59 enable=set((ErrorCode(prefix="XYZ", id=101),)),60 )61 )62 expected = "test/e2e/dummy.py:1:1 [XYZ101]: This message is disabled by default" # noqa: E50163 assert len(errors) == 1...
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!!