How to use test_remote method in avocado

Best Python code snippet using avocado_python

test_download_utils.py

Source:test_download_utils.py Github

copy

Full Screen

1import os2from pathlib import Path3import shutil4import zipfile5import re6from soundata import download_utils7from soundata.datasets import esc508import pytest9@pytest.fixture10def mock_download_from_remote(mocker):11 return mocker.patch.object(download_utils, "download_from_remote")12@pytest.fixture13def mock_downloader(mocker):14 return mocker.patch.object(download_utils, "downloader")15@pytest.fixture16def mock_untar(mocker):17 return mocker.patch.object(download_utils, "untar")18@pytest.fixture19def mock_unzip(mocker):20 return mocker.patch.object(download_utils, "unzip")21@pytest.fixture22def mock_path(mocker, mock_download_from_remote):23 return mocker.patch.object(Path, "mkdir")24def test_downloader(mocker, mock_path):25 mock_zip = mocker.patch.object(download_utils, "download_zip_file")26 mock_tar = mocker.patch.object(download_utils, "download_tar_file")27 mock_download_from_remote = mocker.patch.object(28 download_utils, "download_from_remote"29 )30 mock_multipart_zip = mocker.patch.object(download_utils, "download_multipart_zip")31 zip_remote = download_utils.RemoteFileMetadata(32 filename="remote.zip", url="a", checksum=("1234")33 )34 multipart_zip_remote = [35 download_utils.RemoteFileMetadata(36 filename="remote.zip", url="a", checksum=("1234")37 ),38 download_utils.RemoteFileMetadata(39 filename="remote.z01", url="b", checksum=("2345")40 ),41 ]42 tar_remote = download_utils.RemoteFileMetadata(43 filename="remote.tar.gz", url="a", checksum=("1234")44 )45 file_remote = download_utils.RemoteFileMetadata(46 filename="remote.txt", url="a", checksum=("1234")47 )48 # Zip only49 download_utils.downloader("a", remotes={"b": zip_remote})50 mock_zip.assert_called_once_with(zip_remote, "a", False, False)51 mocker.resetall()52 # tar only53 download_utils.downloader("a", remotes={"b": tar_remote})54 mock_tar.assert_called_once_with(tar_remote, "a", False, False)55 mocker.resetall()56 # file only57 download_utils.downloader("a", remotes={"b": file_remote})58 mock_download_from_remote.assert_called_once_with(file_remote, "a", False)59 mocker.resetall()60 # zip and tar61 download_utils.downloader("a", remotes={"b": zip_remote, "c": tar_remote})62 mock_zip.assert_called_once_with(zip_remote, "a", False, False)63 mock_tar.assert_called_once_with(tar_remote, "a", False, False)64 mocker.resetall()65 # zip and file66 download_utils.downloader("a", remotes={"b": zip_remote, "c": file_remote})67 mock_zip.assert_called_once_with(zip_remote, "a", False, False)68 mock_download_from_remote.assert_called_once_with(file_remote, "a", False)69 mocker.resetall()70 # tar and file71 download_utils.downloader("a", remotes={"b": tar_remote, "c": file_remote})72 mock_tar.assert_called_once_with(tar_remote, "a", False, False)73 mock_download_from_remote.assert_called_once_with(file_remote, "a", False)74 mocker.resetall()75 # zip and tar and file76 download_utils.downloader(77 "a", remotes={"b": zip_remote, "c": tar_remote, "d": file_remote}78 )79 mock_zip.assert_called_once_with(zip_remote, "a", False, False)80 mock_download_from_remote.assert_called_once_with(file_remote, "a", False)81 mock_tar.assert_called_once_with(tar_remote, "a", False, False)82 mocker.resetall()83 # Zip multipart84 download_utils.downloader("a", remotes={"b": multipart_zip_remote})85 mock_multipart_zip.assert_called_once_with(multipart_zip_remote, "a", False, False)86 mocker.resetall()87 # test partial download88 download_utils.downloader(89 "a",90 remotes={"b": zip_remote, "c": tar_remote, "d": file_remote},91 partial_download=["b", "d"],92 )93 mock_zip.assert_called_once_with(zip_remote, "a", False, False)94 mock_download_from_remote.assert_called_once_with(file_remote, "a", False)95 mocker.resetall()96 # test bad type partial download97 with pytest.raises(ValueError):98 download_utils.downloader(99 "a",100 remotes={"b": zip_remote, "c": tar_remote, "d": file_remote},101 partial_download="b",102 )103 with pytest.raises(ValueError):104 download_utils.downloader(105 "a",106 remotes={"b": zip_remote, "c": tar_remote, "d": file_remote},107 partial_download=["d", "e"],108 )109 # test only multipart zip supported110 with pytest.raises(NotImplementedError):111 download_utils.downloader(112 "a",113 remotes={"b": [zip_remote, tar_remote, file_remote]},114 )115 # test info message116 download_utils.downloader("a", info_message="I am a message!")117 mocker.resetall()118 # test download twice - defaults119 download_utils.downloader(120 "a", remotes={"b": zip_remote, "c": tar_remote, "d": file_remote}121 )122 download_utils.downloader(123 "a", remotes={"b": zip_remote, "c": tar_remote, "d": file_remote}124 )125 # test download twice - cleanup=True126 download_utils.downloader(127 "a", remotes={"b": zip_remote, "c": tar_remote, "d": file_remote}, cleanup=True128 )129 download_utils.downloader(130 "a", remotes={"b": zip_remote, "c": tar_remote, "d": file_remote}131 )132def _clean(fpath):133 if os.path.exists(fpath):134 shutil.rmtree(fpath)135def test_downloader_with_server_file(httpserver):136 httpserver.serve_content(open("tests/resources/remote.wav").read())137 TEST_REMOTE = download_utils.RemoteFileMetadata(138 filename="remote.wav",139 url=httpserver.url,140 checksum=("3f77d0d69dc41b3696f074ad6bf2852f"),141 )142 save_dir = "tests/resources/tmp_download_test"143 _clean(save_dir)144 download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE})145 # test downloading twice146 download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE})147 _clean(save_dir)148 download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}, cleanup=True)149 # test downloading twice150 download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE})151 _clean(save_dir)152 download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE})153 # test downloading twice154 download_utils.downloader(155 save_dir, remotes={"b": TEST_REMOTE}, force_overwrite=True156 )157 _clean(save_dir)158def test_downloader_with_server_zip(httpserver):159 httpserver.serve_content(open("tests/resources/remote.zip", "rb").read())160 TEST_REMOTE = download_utils.RemoteFileMetadata(161 filename="remote.zip",162 url=httpserver.url,163 checksum=("7a31ccfa28bfa3fb112d16c96e9d9a89"),164 )165 save_dir = "tests/resources/_tmp_test_download_utils"166 _clean(save_dir)167 download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE})168 # test downloading twice169 download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE})170 _clean(save_dir)171 download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}, cleanup=True)172 # test downloading twice173 download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE})174 _clean(save_dir)175 download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE})176 # test downloading twice177 download_utils.downloader(178 save_dir, remotes={"b": TEST_REMOTE}, force_overwrite=True179 )180 _clean(save_dir)181 download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}, cleanup=True)182 # test downloading twice183 download_utils.downloader(184 save_dir, remotes={"b": TEST_REMOTE}, force_overwrite=True185 )186 _clean(save_dir)187def test_downloader_with_server_tar(httpserver):188 httpserver.serve_content(open("tests/resources/remote.tar.gz", "rb").read())189 TEST_REMOTE = download_utils.RemoteFileMetadata(190 filename="remote.tar.gz",191 url=httpserver.url,192 checksum=("9042f5eebdcd0b94aa7a3c9bf12dc51d"),193 )194 save_dir = "tests/resources/_tmp_test_download_utils"195 _clean(save_dir)196 download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE})197 # test downloading twice198 download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE})199 _clean(save_dir)200 download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE}, cleanup=True)201 # test downloading twice202 download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE})203 _clean(save_dir)204 download_utils.downloader(save_dir, remotes={"b": TEST_REMOTE})205 # test downloading twice206 download_utils.downloader(207 save_dir, remotes={"b": TEST_REMOTE}, force_overwrite=True208 )209 _clean(save_dir)210def test_download_from_remote(httpserver, tmpdir):211 httpserver.serve_content(open("tests/resources/remote.wav").read())212 TEST_REMOTE = download_utils.RemoteFileMetadata(213 filename="remote.wav",214 url=httpserver.url,215 checksum=("3f77d0d69dc41b3696f074ad6bf2852f"),216 )217 download_path = download_utils.download_from_remote(TEST_REMOTE, str(tmpdir), False)218def test_download_from_remote_destdir(httpserver, tmpdir):219 httpserver.serve_content(open("tests/resources/remote.wav").read())220 TEST_REMOTE = download_utils.RemoteFileMetadata(221 filename="remote.wav",222 url=httpserver.url,223 checksum=("3f77d0d69dc41b3696f074ad6bf2852f"),224 destination_dir="subfolder",225 )226 download_path = download_utils.download_from_remote(TEST_REMOTE, str(tmpdir), False)227 expected_download_path = os.path.join(str(tmpdir), "subfolder", "remote.wav")228 assert expected_download_path == download_path229def test_download_from_remote_raises_IOError(httpserver, tmpdir):230 httpserver.serve_content("File not found!", 404)231 TEST_REMOTE = download_utils.RemoteFileMetadata(232 filename="remote.wav", url=httpserver.url, checksum=("1234")233 )234 with pytest.raises(IOError):235 download_utils.download_from_remote(TEST_REMOTE, str(tmpdir), False)236def test_unpackdir(httpserver):237 data_home = "tests/resources/sound_datasets/esc50_download"238 if os.path.exists(data_home):239 shutil.rmtree(data_home)240 # download the full dataset241 httpserver.serve_content(242 open("tests/resources/download/ESC-50-master.zip", "rb").read()243 )244 remotes = {245 "all": download_utils.RemoteFileMetadata(246 filename="ESC-50-master.zip",247 url=httpserver.url,248 checksum=("91281932a1c5ff0473f103c628a53d77"),249 unpack_directories=["ESC-50-master"],250 )251 }252 dataset = esc50.Dataset(data_home)253 dataset.remotes = remotes254 dataset.download(None, False, False)255 assert os.path.exists(data_home)256 assert not os.path.exists(os.path.join(data_home, "ESC-50-master"))257 assert os.path.exists(os.path.join(data_home, "requirements.txt"))258 assert os.path.exists(259 os.path.join(260 data_home,261 "audio/1-137-A-32.wav",262 )263 )264def test_unzip():265 download_utils.unzip("tests/resources/file.zip", cleanup=False)266 expected_file_location = os.path.join("tests", "resources", "file.txt")267 assert os.path.exists(expected_file_location)268 os.remove(expected_file_location)269def test_untar():270 download_utils.untar("tests/resources/file.tar.gz", cleanup=False)271 expected_file_location = os.path.join("tests", "resources", "file", "file.txt")272 assert os.path.exists(expected_file_location)273 os.remove(expected_file_location)274def test_download_zip_file(mocker, mock_download_from_remote, mock_unzip):275 mock_download_from_remote.return_value = "foo"276 download_utils.download_zip_file("a", "b", False, False)277 mock_download_from_remote.assert_called_once_with("a", "b", False)278 mock_unzip.assert_called_once_with("foo", cleanup=False)279 _clean("a")280def test_download_multipart_zip(mocker, mock_download_from_remote, mock_unzip):281 Path("tests/resources/foo.zip").touch()282 Path("tests/resources/foo.z01").touch()283 multipart_zip_remote = {284 "foo": [285 download_utils.RemoteFileMetadata(286 filename="foo.zip", url="a", checksum=("1234")287 ),288 download_utils.RemoteFileMetadata(289 filename="foo.z01", url="b", checksum=("2345")290 ),291 ]292 }293 download_utils.downloader(294 "tests/resources", multipart_zip_remote, force_overwrite=False, cleanup=True295 )296 mock_download_from_remote.assert_has_calls(297 [298 mocker.call(multipart_zip_remote["foo"][0], "tests/resources", False),299 mocker.call(multipart_zip_remote["foo"][1], "tests/resources", False),300 ]301 )302 mock_unzip.assert_called_once_with("tests/resources/foo_single.zip", cleanup=True)303def test_download_tar_file(mocker, mock_download_from_remote, mock_untar):304 mock_download_from_remote.return_value = "foo"305 download_utils.download_tar_file("a", "b", False, False)306 mock_download_from_remote.assert_called_once_with("a", "b", False)307 mock_untar.assert_called_once_with("foo", cleanup=False)308 _clean("a")309def test_extractall_unicode(mocker, mock_download_from_remote, mock_unzip):310 zfile = zipfile.ZipFile("tests/resources/utfissue.zip", "r")311 download_utils.extractall_unicode(zfile, os.path.dirname("tests/resources/"))312 zfile.close()313 expected_files = ["pic👨‍👩‍👧‍👦🎂.jpg", "Benoît.txt"]314 for expected_file in expected_files:315 expected_file_location = os.path.join("tests", "resources", expected_file)316 assert os.path.exists(expected_file_location)317 os.remove(expected_file_location)318def test_extractall_cp437(mocker, mock_download_from_remote, mock_unzip):319 zfile = zipfile.ZipFile("tests/resources/utfissue.zip", "r")320 zfile.extractall(os.path.dirname("tests/resources/"))321 zfile.close()322 expected_files = ["pic👨‍👩‍👧‍👦🎂.jpg", "Benoît.txt"]323 for expected_file in expected_files:324 expected_file_location = os.path.join("tests", "resources", expected_file)325 assert not os.path.exists(expected_file_location)326 true_files = [327 file328 for file in os.listdir(os.path.join("tests", "resources"))329 if re.match(r"(pic.*).jpg", file) or re.match(r"(Beno.*).txt", file)330 ]331 for true_file in true_files:332 true_file_location = os.path.join("tests", "resources", true_file)333 os.remove(true_file_location)...

Full Screen

Full Screen

generated_project_test.py

Source:generated_project_test.py Github

copy

Full Screen

1import os2import shutil3from pathlib import Path4import unittest5import subprocess6class InitTest(unittest.TestCase):7 def setUp(self):8 subprocess.run(['surround', 'init', './', '-p', 'temp', '-d', 'temp', '-w', 'no'], encoding='utf-8', stdout=subprocess.PIPE)9 os.makedirs('remote')10 os.makedirs('temp/test_remote')11 Path('temp/test_remote/a.txt').touch()12 def test_run_from_subdir(self):13 process = subprocess.run(['surround', 'run'], encoding='utf-8', stdout=subprocess.PIPE)14 self.assertEqual(process.stdout, "error: not a surround project\n")15 process = subprocess.run(['surround', 'run'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp')16 self.assertEqual(process.stdout[:48], "batch Run batch mode inside the container")17 process = subprocess.run(['surround', 'run'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')18 self.assertEqual(process.stdout[:48], "batch Run batch mode inside the container")19 def test_remote_from_subdir(self):20 process = subprocess.run(['surround', 'remote'], encoding='utf-8', stdout=subprocess.PIPE)21 self.assertEqual(process.stdout, "error: not a surround project\n")22 process = subprocess.run(['surround', 'remote'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp')23 self.assertEqual(process.stdout, "info: no remote found\n")24 process = subprocess.run(['surround', 'remote'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')25 self.assertEqual(process.stdout, "info: no remote found\n")26 process = subprocess.run(['surround', 'remote', '-a', '-n', 'test_remote', '-u', '~', '-t', 'data'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')27 process = subprocess.run(['surround', 'remote'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')28 self.assertEqual(process.stdout, "test_remote\n")29 def test_add_from_subdir(self):30 process = subprocess.run(['surround', 'add', 'test_remote', 'a.jpg'], encoding='utf-8', stdout=subprocess.PIPE)31 self.assertEqual(process.stdout, "error: not a surround project\n")32 process = subprocess.run(['surround', 'add', 'test_remote', 'a.jpg'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp')33 self.assertEqual(process.stdout, "error: no remote named test_remote\n")34 process = subprocess.run(['surround', 'add', 'test_remote', 'a.jpg'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')35 self.assertEqual(process.stdout, "error: no remote named test_remote\n")36 process = subprocess.run(['surround', 'remote', '-a', '-n', 'test_remote', '-u', 'remote', '-t', 'data'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')37 process = subprocess.run(['surround', 'add', 'test_remote', 'a.jpg'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp')38 self.assertEqual(process.stdout, "error: a.jpg not found.\n")39 process = subprocess.run(['surround', 'add', 'test_remote', 'a.jpg'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')40 self.assertEqual(process.stdout, "error: a.jpg not found.\n")41 process = subprocess.run(['surround', 'add', 'test_remote', 'a.txt'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')42 self.assertEqual(process.stdout, "info: file added successfully\n")43 def test_pull_from_subdir(self):44 process = subprocess.run(['surround', 'pull', 'test_remote', '-k', 'a.jpg'], encoding='utf-8', stdout=subprocess.PIPE)45 self.assertEqual(process.stdout, "error: not a surround project\n")46 process = subprocess.run(['surround', 'pull', 'test_remote', '-k', 'a.jpg'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp')47 self.assertEqual(process.stdout, "error: no remote named test_remote\n")48 process = subprocess.run(['surround', 'pull', 'test_remote', '-k', 'a.jpg'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')49 self.assertEqual(process.stdout, "error: no remote named test_remote\n")50 process = subprocess.run(['surround', 'remote', '-a', '-n', 'test_remote', '-u', 'remote', '-t', 'data'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')51 process = subprocess.run(['surround', 'pull', 'test_remote', '-k', 'a.jpg'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp')52 self.assertEqual(process.stdout, "error: file does not exist\n")53 process = subprocess.run(['surround', 'pull', 'test_remote', '-k', 'a.jpg'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')54 self.assertEqual(process.stdout, "error: file does not exist\n")55 process = subprocess.run(['surround', 'pull', 'test_remote', '-k', 'a.txt'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')56 self.assertEqual(process.stdout, "info: test_remote/a.txt already exists\n")57 def test_push_from_subdir(self):58 process = subprocess.run(['surround', 'push', 'test_remote', '-k', 'a.jpg'], encoding='utf-8', stdout=subprocess.PIPE)59 self.assertEqual(process.stdout, "error: not a surround project\n")60 process = subprocess.run(['surround', 'push', 'test_remote', '-k', 'a.jpg'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp')61 self.assertEqual(process.stdout, "error: no remote named test_remote\n")62 process = subprocess.run(['surround', 'push', 'test_remote', '-k', 'a.jpg'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')63 self.assertEqual(process.stdout, "error: no remote named test_remote\n")64 process = subprocess.run(['surround', 'remote', '-a', '-n', 'test_remote', '-u', 'remote', '-t', 'data'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')65 process = subprocess.run(['surround', 'push', 'test_remote', '-k', 'a.jpg'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp')66 self.assertEqual(process.stdout, "error: file does not exist\n")67 process = subprocess.run(['surround', 'push', 'test_remote', '-k', 'a.jpg'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')68 self.assertEqual(process.stdout, "error: file does not exist\n")69 process = subprocess.run(['surround', 'push', 'test_remote', '-k', 'a.txt'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp')70 self.assertEqual(process.stdout, "info: a.txt pushed successfully\n")71 process = subprocess.run(['surround', 'push', 'test_remote', '-k', 'a.txt'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')72 self.assertEqual(process.stdout, "info: remote/temp/a.txt already exists\n")73 process = subprocess.run(['rm', 'test_remote/a.txt'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp')74 process = subprocess.run(['surround', 'pull', 'test_remote', '-k', 'a.txt'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')75 self.assertEqual(process.stdout, "info: a.txt pulled successfully\n")76 def test_list_from_subdir(self):77 process = subprocess.run(['surround', 'list', 'test_remote'], encoding='utf-8', stdout=subprocess.PIPE)78 self.assertEqual(process.stdout, "error: not a surround project\n")79 process = subprocess.run(['surround', 'list', 'test_remote'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp')80 self.assertEqual(process.stdout, "error: no remote named test_remote\n")81 process = subprocess.run(['surround', 'list', 'test_remote'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')82 self.assertEqual(process.stdout, "error: no remote named test_remote\n")83 process = subprocess.run(['surround', 'remote', '-a', '-n', 'test_remote', '-u', 'remote', '-t', 'data'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')84 process = subprocess.run(['surround', 'push', 'test_remote', '-k', 'a.txt'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp')85 self.assertEqual(process.stdout, "info: a.txt pushed successfully\n")86 process = subprocess.run(['surround', 'list', 'test_remote'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp')87 self.assertEqual(process.stdout, "a.txt\n")88 process = subprocess.run(['surround', 'list', 'test_remote'], encoding='utf-8', stdout=subprocess.PIPE, cwd='temp/temp')89 self.assertEqual(process.stdout, "a.txt\n")90 def tearDown(self):91 # Remove residual directories and files92 shutil.rmtree('temp')...

Full Screen

Full Screen

test_combined.py

Source:test_combined.py Github

copy

Full Screen

1import time2from contextlib import contextmanager3from race.abstract import Label4from race.generator.remote import RemoteGenerator5from race.generator.thread import ThreadGenerator, thread_yield6from race_tests.generator import test_remote7from race_tests.generator.test_remote import (8 TestRemoteGenerator as _TestRemoteGenerator, TEN, _CustomError,9)10from race_tests.generator.test_thread import _generator_fun, _generator_fun_exc11def _generator_fun_exc_immediate():12 raise _CustomError13def _generator_fun_deadlock():14 for i in range(TEN):15 thread_yield(Label.from_yield(i))16 time.sleep(9999999)17_MAP = {18 test_remote._generator_fun: _generator_fun,19 test_remote._generator_fun_exc: _generator_fun_exc,20 test_remote._generator_fun_exc_immediate: _generator_fun_exc_immediate,21 test_remote._generator_fun_deadlock: _generator_fun_deadlock,22}23class TestCombinedGenerator(_TestRemoteGenerator):24 @contextmanager25 def _generator(self, fun):26 with ThreadGenerator(_MAP[fun]) as thread, RemoteGenerator(thread) as remote:...

Full Screen

Full Screen

Automation Testing Tutorials

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.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run avocado automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful