{"id":21382,"date":"2018-04-10T12:15:17","date_gmt":"2018-04-10T09:15:17","guid":{"rendered":"https:\/\/www.webcodegeeks.com\/?p=21382"},"modified":"2018-04-10T12:03:28","modified_gmt":"2018-04-10T09:03:28","slug":"fixtures-in-pytest","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/","title":{"rendered":"Fixtures in PyTest"},"content":{"rendered":"<h2>1. Introduction<\/h2>\n<p>PyTest is used for developing automation tests using python. It is a very powerful framework that can be utilized to write effective test automation scenarios in python. PyTest framework makes it easy to write small tests, yet scalable, to support complex applications and libraries.<\/p>\n<h2>2. PyTest fixtures<\/h2>\n<p>The purpose of test fixtures is to provide an inbuilt baseline which would provide repeated and reliable execution of tests. Fixtures help in reducing time and effort of implementing a function several times. Instead of implementing and defining a function, which would be used repeatedly, just call the same function as a fixture object and get it executed.<\/p>\n<h2>3. Passing fixture objects as function arguments<\/h2>\n<p>Test functions can receive fixture objects by invoking them as input arguments. To define a fixture function we have to use the decorator\u00a0<code>@pytest.fixture<\/code>\u00a0.Let us consider a very small example to understand how a fixture can be implemented in real applications.<\/p>\n<pre class=\"brush:python\">from selenium import webdriver\r\nfrom selenium.webdriver.common.by import By\r\nfrom selenium.webdriver.common.keys import Keys\r\nfrom selenium.common.exceptions import WebDriverException, NoSuchElementException\r\nimport traceback, time\r\n\r\n@pytest.fixture\r\ndef selenium_driver():\r\n try:\r\n   driver = webdriver.Chrome(executable_path='\/usr\/local\/bin\/chromedriver')\r\n   print(\"\\n&gt;&gt;&gt;Driver returned\")\r\n   return driver\r\n   except WebDriverException:\r\n   print(\"\\n&gt;&gt;&gt;WebDriver configuration error\")\r\n   traceback.print_exc()\r\n\r\ndef test_function(selenium_driver):\r\n try:\r\n   #Navigate to google\r\n   driver.get(\"https:\/\/www.google.co.in\/\")\r\n   #Maximize browser window\r\n   browser.maximize_window()\r\n   browser.implicitly_wait(5)\r\n   #Enter keyword in input panel\r\n   browser.find_element(By.CSS_SELECTOR,\"input[name='q']\").send_keys(\"Some input\")\r\n   print(\"\\n&gt;&gt;&gt;Entered data to search\")\r\n   #Press enter to search\r\n   browser.find_element(By.CSS_SELECTOR,\"input[name='q']\").send_keys(Keys.ENTER)\r\n   print(\"\\n&gt;&gt;Key pressed to search element\")\r\n   time.sleep(5)\r\n   browser.find_element(By.XPATH,\"\/\/a[contains(text(),'Some text')]\").click()\r\n   #Validate the title of the page\r\n   assert browser.title == \"Some title\"\r\n   print(\"\\n&gt;&gt;&gt;Title of the page verified\")\r\n   except NoSuchElementException:\r\n   print(\"\\n&gt;&gt;&gt;Element not found\")\r\n   traceback.print_exc()<\/pre>\n<h2>4. Fixtures: An example of dependency injection<\/h2>\n<p>Using fixture can be considered as a strong example of dependency injection. Fixtures allow a test function to operate by calling an already pre-initialized application object without caring much about the import\/clean up\/set up details. The fixture functions act as a dependency injector and the test functions which utilize the fixture object are the consumers.<\/p>\n<h2>5. Using fixtures across tests in a module (class\/sessions)<\/h2>\n<p>Fixtures can be declared to be used within modules, class or a particular session. To accomplish this, the scope of a fixture has to be defined, which means, during the declaration of a fixture we have to define the scope as module\/session\/class. For example:<\/p>\n<pre class=\"brush:python\">#contents of selenium_driver.py\r\nfrom selenium import webdriver\r\nfrom selenium.common.exceptions import WebDriverException\r\nimport traceback\r\n \r\n@pytest.fixture(scope=\"module\")\r\ndef selenium_driver():\r\ntry:\r\ndriver = webdriver.Chrome(executable_path='\/usr\/local\/bin\/chromedriver')\r\nprint(\"\\n&gt;&gt;&gt;Driver returned\")\r\nreturn driver\r\nexcept WebDriverException:\r\nprint(\"\\n&gt;&gt;&gt;WebDriver configuration error\")\r\ntraceback.print_exc()\r\n \r\n#contents of test1.py\r\nfrom selenium import webdriver\r\nfrom selenium.webdriver.common.by import By\r\nfrom selenium.webdriver.common.keys import Keys\r\nfrom selenium.common.exceptions import NoSuchElementException\r\nimport traceback, time\r\ndef test1(selenium_driver):\r\ntry:\r\n#Navigate to google\r\ndriver.get(\"https:\/\/www.google.co.in\/\")\r\n#Maximize browser window browser.maximize_window()\r\ndriver.implicitly_wait(5)\r\n#Enter keyword in input panel\r\ndriver.find_element(By.CSS_SELECTOR,\"input[name='q']\").send_keys(\"Some input\")\r\nprint(\"\\n&gt;&gt;&gt;Entered data to search\")\r\n#Press enter to search\r\ndriver.find_element(By.CSS_SELECTOR,\"input[name='q']\").send_keys(Keys.ENTER)\r\nprint(\"\\n&gt;&gt;Key pressed to search element\")\r\ntime.sleep(5)\r\ndriver.find_element(By.XPATH,\"\/\/a[contains(text(),'Some text')]\").click()\r\n#Validate the title of the page\r\nassert browser.title == \"Some title\"\r\nprint(\"\\n&gt;&gt;&gt;Title of the page verified\")\r\nexcept NoSuchElementException:\r\nprint(\"\\n&gt;&gt;&gt;Element not found\")\r\ntraceback.print_exc()\r\n \r\n#contents of test2.py\r\nfrom selenium import webdriver\r\nfrom selenium.webdriver.common.by import By\r\nfrom selenium.webdriver.common.keys import Keys\r\nfrom selenium.common.exceptions import NoSuchElementException\r\nimport traceback, time\r\ndef test2(selenium_driver):\r\ntry:\r\n#Navigate to google\r\ndriver.get(\"https:\/\/www.google.co.in\/\")\r\n#Maximize browser window\r\ndriver.maximize_window()\r\ndriver.implicitly_wait(5)\r\n#Enter keyword in input panel\r\ndriver.find_element(By.CSS_SELECTOR,\"input[name='q']\").send_keys(\"Some input\")\r\nprint(\"\\n&gt;&gt;&gt;Entered data to search\")\r\n#Press enter to search\r\ndriver.find_element(By.CSS_SELECTOR,\"input[name='q']\").send_keys(Keys.ENTER)\r\nprint(\"\\n&gt;&gt;Key pressed to search element\")\r\ntime.sleep(5)\r\ndriver.find_element(By.XPATH,\"\/\/a[contains(text(),'Some text')]\").click()\r\n#Validate the title of the page\r\nassert browser.title == \"Some title\"\r\nprint(\"\\n&gt;&gt;&gt;Title of the page verified\")\r\nexcept NoSuchElementException:\r\nprint(\"\\n&gt;&gt;&gt;Element not found\")\r\ntraceback.print_exc()<\/pre>\n<h2>6. Yield<\/h2>\n<p>The object\u00a0<code>yield<\/code>\u00a0in a fixture is used to execute setup or teardown code. If you have any piece of code that needs to be executed in a sequence of set up and tear down then you can use the decorator\u00a0<code>@pytest.yield_fixture<\/code>. For example, if I want to instantiate a driver as well as terminate the browser session using the same block of code then you can use yield to achieve this.<\/p>\n<pre class=\"brush:python\">import pytest\r\nfrom selenium import webdriver\r\n \r\n@pytest.yield_fixture(scope=\"function\")\r\ndef SetUp(request, browser):\r\n  print(\"\\nRunning one time setUp\")\r\n  wdf = WebDriverFactory(browser)\r\n  driver = wdf.getWebDriverInstance()\r\n\r\n  if request.cls is not None:\r\n    request.cls.driver = driver\r\n  yield driver\r\n  driver.quit()\r\n  print(\"\\nRunning one time tearDown\")<\/pre>\n<p>When\u00a0<em>pytest<\/em>\u00a0runs the above function it will look for a fixture\u00a0<code>SetUp<\/code>\u00a0and run it. Whatever is yielded (or returned) will be passed to the corresponding test function. The \u201cscope\u201d of the fixture is set to \u201cfunction\u201d so as soon as the test is complete, the block after the\u00a0<code>yield<\/code>\u00a0statement will run.<\/p>\n<h2>7. Conclusion<\/h2>\n<p>I have only touched on a particular, yet powerful feature of PyTest. I would highly recommend you to go through the\u00a0<a href=\"http:\/\/pytest.readthedocs.io\/en\/latest\/\">framework<\/a>\u00a0to understand how\u00a0<code>PyTest<\/code>\u00a0functions work and to get started on automating test scenarios using PyTest.<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>Published on Web Code Geeks with permission by Soumyajit Basu, partner at our <a href=\"\/\/www.webcodegeeks.com\/join-us\/wcg\/\" target=\"_blank\" rel=\"noopener\">WCG program<\/a>. See the original article here: <a href=\"https:\/\/soumyajit2016.wordpress.com\/2018\/04\/06\/fixtures-in-pytest\/\" target=\"_blank\" rel=\"noopener\">Fixtures in PyTest<\/a><\/p>\n<p>Opinions expressed by Web Code Geeks contributors are their own.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>1. Introduction PyTest is used for developing automation tests using python. It is a very powerful framework that can be utilized to write effective test automation scenarios in python. PyTest framework makes it easy to write small tests, yet scalable, to support complex applications and libraries. 2. PyTest fixtures The purpose of test fixtures is &hellip;<\/p>\n","protected":false},"author":1029,"featured_media":1651,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[53],"tags":[490],"class_list":["post-21382","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-pytest"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Fixtures in PyTest - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"1. Introduction PyTest is used for developing automation tests using python. It is a very powerful framework that can be utilized to write effective test\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Fixtures in PyTest - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"1. Introduction PyTest is used for developing automation tests using python. It is a very powerful framework that can be utilized to write effective test\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/soumyajit.basu\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-10T09:15:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Soumyajit Basu\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@SoumyajitBasu19\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Soumyajit Basu\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/\"},\"author\":{\"name\":\"Soumyajit Basu\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c2aa0b158203f117998917927a96c276\"},\"headline\":\"Fixtures in PyTest\",\"datePublished\":\"2018-04-10T09:15:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/\"},\"wordCount\":467,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"keywords\":[\"PyTest\"],\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/\",\"name\":\"Fixtures in PyTest - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"datePublished\":\"2018-04-10T09:15:17+00:00\",\"description\":\"1. Introduction PyTest is used for developing automation tests using python. It is a very powerful framework that can be utilized to write effective test\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/python\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Fixtures in PyTest\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c2aa0b158203f117998917927a96c276\",\"name\":\"Soumyajit Basu\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ca834774616f992a60dd418c3424f7d678f645d0974d880abe735f481c8b1407?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ca834774616f992a60dd418c3424f7d678f645d0974d880abe735f481c8b1407?s=96&d=mm&r=g\",\"caption\":\"Soumyajit Basu\"},\"description\":\"Soumyajit is a QA\/DevOps engineer by profession and a technology enthusiast by passion. He loves communicating about technology and is an author at his own blog platform as well as in Dzone and Web Code Geeks.\",\"sameAs\":[\"https:\/\/soumyajit2016.wordpress.com\/\",\"https:\/\/www.facebook.com\/soumyajit.basu\",\"https:\/\/www.linkedin.com\/in\/soumyajit-basu-5a783886\/\",\"https:\/\/x.com\/SoumyajitBasu19\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/soumyajit-basu\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Fixtures in PyTest - Web Code Geeks - 2026","description":"1. Introduction PyTest is used for developing automation tests using python. It is a very powerful framework that can be utilized to write effective test","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/","og_locale":"en_US","og_type":"article","og_title":"Fixtures in PyTest - Web Code Geeks - 2026","og_description":"1. Introduction PyTest is used for developing automation tests using python. It is a very powerful framework that can be utilized to write effective test","og_url":"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_author":"https:\/\/www.facebook.com\/soumyajit.basu","article_published_time":"2018-04-10T09:15:17+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","type":"image\/jpeg"}],"author":"Soumyajit Basu","twitter_card":"summary_large_image","twitter_creator":"@SoumyajitBasu19","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Soumyajit Basu","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/"},"author":{"name":"Soumyajit Basu","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c2aa0b158203f117998917927a96c276"},"headline":"Fixtures in PyTest","datePublished":"2018-04-10T09:15:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/"},"wordCount":467,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","keywords":["PyTest"],"articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/","url":"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/","name":"Fixtures in PyTest - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","datePublished":"2018-04-10T09:15:17+00:00","description":"1. Introduction PyTest is used for developing automation tests using python. It is a very powerful framework that can be utilized to write effective test","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/11\/python-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/python\/fixtures-in-pytest\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Python","item":"https:\/\/www.webcodegeeks.com\/category\/python\/"},{"@type":"ListItem","position":3,"name":"Fixtures in PyTest"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/c2aa0b158203f117998917927a96c276","name":"Soumyajit Basu","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ca834774616f992a60dd418c3424f7d678f645d0974d880abe735f481c8b1407?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ca834774616f992a60dd418c3424f7d678f645d0974d880abe735f481c8b1407?s=96&d=mm&r=g","caption":"Soumyajit Basu"},"description":"Soumyajit is a QA\/DevOps engineer by profession and a technology enthusiast by passion. He loves communicating about technology and is an author at his own blog platform as well as in Dzone and Web Code Geeks.","sameAs":["https:\/\/soumyajit2016.wordpress.com\/","https:\/\/www.facebook.com\/soumyajit.basu","https:\/\/www.linkedin.com\/in\/soumyajit-basu-5a783886\/","https:\/\/x.com\/SoumyajitBasu19"],"url":"https:\/\/www.webcodegeeks.com\/author\/soumyajit-basu\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/21382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/1029"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=21382"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/21382\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/1651"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=21382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=21382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=21382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}