Best Python code snippet using autotest_python
test_selector.py
Source:test_selector.py
...66 assert not s.wantClass(Bar), "Failed to respect __test__ = False"67 68 def test_want_directory(self):69 s = Selector(Config())70 assert s.wantDirectory('test')71 assert not s.wantDirectory('test/whatever')72 assert s.wantDirectory('whatever/test')73 assert not s.wantDirectory('/some/path/to/unit_tests/support')74 # default src directory75 assert s.wantDirectory('lib')76 assert s.wantDirectory('src')77 # FIXME move to functional tests78 79 # this looks on disk for support/foo, which is a package80 here = os.path.abspath(os.path.dirname(__file__))81 support = os.path.join(here, 'support')82 tp = os.path.normpath(os.path.join(support, 'foo'))83 assert s.wantDirectory(tp)84 # this looks for support, which is not a package85 assert not s.wantDirectory(support) 86 87 def test_want_file(self):88 #logging.getLogger('nose.selector').setLevel(logging.DEBUG)89 #logging.basicConfig()90 91 c = Config()92 c.where = [absdir(os.path.join(os.path.dirname(__file__), 'support'))]93 base = c.where[0]94 s = Selector(c)95 assert not s.wantFile('setup.py')96 assert not s.wantFile('/some/path/to/setup.py')97 assert not s.wantFile('ez_setup.py')98 assert not s.wantFile('.test.py')99 assert not s.wantFile('_test.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!!