SlideShare una empresa de Scribd logo
1 de 7
TDD with python, pytest and
vim
Setting up
Getting Started
• pip install pytest
• pip install pytest-xdist
• If you are using Anaconda, pytest should already be installed
Directory/Folder structure
Create a tests folder in your
project directory
Test data for testing
dataframes
Name corresponding test files
with a test_ infront
Using VIM
• Open vim <filename> in the root directory
• Enter :vsplit <tests/filename> in vim’s console
• You will get a split window.
• Ctrl-wx to swap columns in the order of preference. I.e. code on left,
test on right or vice versa
• Ctrl-ww to switch editing columns
Using VIM - vsplit
CODE TESTS
Using VIM – vsplit
Cursor
Here shows
where you are
editing
code testsCtrl-ww
Pytest
• Run pytest -f -v in
the root of your
project directory
• Pytest will be
watching for any
changes in the code
or tests.
• Once you save
either file, it will re-
run all tests
automatically

Más contenido relacionado

La actualidad más candente

introduction to python
 introduction to python introduction to python
introduction to pythonJincy Nelson
 
MNE-Python Coregistration
MNE-Python CoregistrationMNE-Python Coregistration
MNE-Python Coregistrationmne-python
 
pandas: Powerful data analysis tools for Python
pandas: Powerful data analysis tools for Pythonpandas: Powerful data analysis tools for Python
pandas: Powerful data analysis tools for PythonWes McKinney
 
Introduction to Python GUI development with Delphi for Python - Part 1: Del...
Introduction to Python GUI development with Delphi for Python - Part 1:   Del...Introduction to Python GUI development with Delphi for Python - Part 1:   Del...
Introduction to Python GUI development with Delphi for Python - Part 1: Del...Embarcadero Technologies
 
Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3Chariza Pladin
 
Integrating Telegram Bots with Ruby on Rails
Integrating Telegram Bots with Ruby on RailsIntegrating Telegram Bots with Ruby on Rails
Integrating Telegram Bots with Ruby on RailsChris Downey
 
Data Analysis and Visualization using Python
Data Analysis and Visualization using PythonData Analysis and Visualization using Python
Data Analysis and Visualization using PythonChariza Pladin
 
Python File Handling | File Operations in Python | Learn python programming |...
Python File Handling | File Operations in Python | Learn python programming |...Python File Handling | File Operations in Python | Learn python programming |...
Python File Handling | File Operations in Python | Learn python programming |...Edureka!
 
MNE-Python Coregistration
MNE-Python CoregistrationMNE-Python Coregistration
MNE-Python Coregistrationmne-python
 
Python 3 Programming Language
Python 3 Programming LanguagePython 3 Programming Language
Python 3 Programming LanguageTahani Al-Manie
 
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...Edureka!
 
Python oop - class 2 (inheritance)
Python   oop - class 2 (inheritance)Python   oop - class 2 (inheritance)
Python oop - class 2 (inheritance)Aleksander Fabijan
 
Introduction to-python
Introduction to-pythonIntroduction to-python
Introduction to-pythonAakashdata
 
Socket programming
Socket programmingSocket programming
Socket programmingNemiRathore
 

La actualidad más candente (20)

Python Tutorial Part 1
Python Tutorial Part 1Python Tutorial Part 1
Python Tutorial Part 1
 
Modern Python Testing
Modern Python TestingModern Python Testing
Modern Python Testing
 
Rest api with Python
Rest api with PythonRest api with Python
Rest api with Python
 
Python ppt
Python pptPython ppt
Python ppt
 
Python Basics.pdf
Python Basics.pdfPython Basics.pdf
Python Basics.pdf
 
introduction to python
 introduction to python introduction to python
introduction to python
 
MNE-Python Coregistration
MNE-Python CoregistrationMNE-Python Coregistration
MNE-Python Coregistration
 
pandas: Powerful data analysis tools for Python
pandas: Powerful data analysis tools for Pythonpandas: Powerful data analysis tools for Python
pandas: Powerful data analysis tools for Python
 
Introduction to Python GUI development with Delphi for Python - Part 1: Del...
Introduction to Python GUI development with Delphi for Python - Part 1:   Del...Introduction to Python GUI development with Delphi for Python - Part 1:   Del...
Introduction to Python GUI development with Delphi for Python - Part 1: Del...
 
Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3
 
Integrating Telegram Bots with Ruby on Rails
Integrating Telegram Bots with Ruby on RailsIntegrating Telegram Bots with Ruby on Rails
Integrating Telegram Bots with Ruby on Rails
 
Data Analysis and Visualization using Python
Data Analysis and Visualization using PythonData Analysis and Visualization using Python
Data Analysis and Visualization using Python
 
Python File Handling | File Operations in Python | Learn python programming |...
Python File Handling | File Operations in Python | Learn python programming |...Python File Handling | File Operations in Python | Learn python programming |...
Python File Handling | File Operations in Python | Learn python programming |...
 
MNE-Python Coregistration
MNE-Python CoregistrationMNE-Python Coregistration
MNE-Python Coregistration
 
Python : Regular expressions
Python : Regular expressionsPython : Regular expressions
Python : Regular expressions
 
Python 3 Programming Language
Python 3 Programming LanguagePython 3 Programming Language
Python 3 Programming Language
 
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
 
Python oop - class 2 (inheritance)
Python   oop - class 2 (inheritance)Python   oop - class 2 (inheritance)
Python oop - class 2 (inheritance)
 
Introduction to-python
Introduction to-pythonIntroduction to-python
Introduction to-python
 
Socket programming
Socket programmingSocket programming
Socket programming
 

Destacado

Uno a uno somos mortales, juntos seremos eternos
Uno a uno somos mortales, juntos seremos eternosUno a uno somos mortales, juntos seremos eternos
Uno a uno somos mortales, juntos seremos eternosManuel Colmenero
 
Semestrario Esparza Herrera Ramón
Semestrario Esparza Herrera RamónSemestrario Esparza Herrera Ramón
Semestrario Esparza Herrera RamónRamon Herrera
 
Aplicaciones de Herramientas
Aplicaciones de HerramientasAplicaciones de Herramientas
Aplicaciones de Herramientasdayitagaona08
 
Becoming an Influencer: Strategies for Change
Becoming an Influencer: Strategies for ChangeBecoming an Influencer: Strategies for Change
Becoming an Influencer: Strategies for ChangeDr. Ed Cabellon
 
Practical Guide to Product Roadmapping
Practical Guide to Product RoadmappingPractical Guide to Product Roadmapping
Practical Guide to Product RoadmappingJoe Granda
 
Value-Based Payments and Managed Care Contracting - Crash Course Webinar Series
Value-Based Payments and Managed Care Contracting - Crash Course Webinar SeriesValue-Based Payments and Managed Care Contracting - Crash Course Webinar Series
Value-Based Payments and Managed Care Contracting - Crash Course Webinar SeriesEpstein Becker Green
 
Piwik PRO The Real Cost of Data Privacy
Piwik PRO The Real Cost of Data Privacy Piwik PRO The Real Cost of Data Privacy
Piwik PRO The Real Cost of Data Privacy Piwik PRO
 
самостійна робота
самостійна роботасамостійна робота
самостійна роботаslavinskiy
 
Peter Hinssen @ Revolve! UnConference
Peter Hinssen @ Revolve! UnConferencePeter Hinssen @ Revolve! UnConference
Peter Hinssen @ Revolve! UnConferencenexxworks
 
McGregor Boyall Asia Pacific Brochure
McGregor Boyall Asia Pacific BrochureMcGregor Boyall Asia Pacific Brochure
McGregor Boyall Asia Pacific BrochureMcGregor Boyall
 
Les big data KU Leuven
Les big data KU LeuvenLes big data KU Leuven
Les big data KU LeuvenWard Hemeryck
 
Några myter om dubbade och odubbade vinterdäck
Några myter om dubbade och odubbade vinterdäckNågra myter om dubbade och odubbade vinterdäck
Några myter om dubbade och odubbade vinterdäckJohan Granlund
 

Destacado (20)

Uno a uno somos mortales, juntos seremos eternos
Uno a uno somos mortales, juntos seremos eternosUno a uno somos mortales, juntos seremos eternos
Uno a uno somos mortales, juntos seremos eternos
 
TLC
TLCTLC
TLC
 
Semestrario Esparza Herrera Ramón
Semestrario Esparza Herrera RamónSemestrario Esparza Herrera Ramón
Semestrario Esparza Herrera Ramón
 
Aplicaciones de Herramientas
Aplicaciones de HerramientasAplicaciones de Herramientas
Aplicaciones de Herramientas
 
Becoming an Influencer: Strategies for Change
Becoming an Influencer: Strategies for ChangeBecoming an Influencer: Strategies for Change
Becoming an Influencer: Strategies for Change
 
Ondas y sonido
Ondas y sonidoOndas y sonido
Ondas y sonido
 
Practical Guide to Product Roadmapping
Practical Guide to Product RoadmappingPractical Guide to Product Roadmapping
Practical Guide to Product Roadmapping
 
Scooters for sale
Scooters for saleScooters for sale
Scooters for sale
 
Value-Based Payments and Managed Care Contracting - Crash Course Webinar Series
Value-Based Payments and Managed Care Contracting - Crash Course Webinar SeriesValue-Based Payments and Managed Care Contracting - Crash Course Webinar Series
Value-Based Payments and Managed Care Contracting - Crash Course Webinar Series
 
CUMPLEAÑOS 84 DE LA CIUDAD DE EL TIGRE pdf
CUMPLEAÑOS 84 DE LA CIUDAD DE EL TIGRE pdfCUMPLEAÑOS 84 DE LA CIUDAD DE EL TIGRE pdf
CUMPLEAÑOS 84 DE LA CIUDAD DE EL TIGRE pdf
 
Flink meetup
Flink   meetupFlink   meetup
Flink meetup
 
Piwik PRO The Real Cost of Data Privacy
Piwik PRO The Real Cost of Data Privacy Piwik PRO The Real Cost of Data Privacy
Piwik PRO The Real Cost of Data Privacy
 
самостійна робота
самостійна роботасамостійна робота
самостійна робота
 
Peter Hinssen @ Revolve! UnConference
Peter Hinssen @ Revolve! UnConferencePeter Hinssen @ Revolve! UnConference
Peter Hinssen @ Revolve! UnConference
 
Digipak case study
Digipak case studyDigipak case study
Digipak case study
 
McGregor Boyall Asia Pacific Brochure
McGregor Boyall Asia Pacific BrochureMcGregor Boyall Asia Pacific Brochure
McGregor Boyall Asia Pacific Brochure
 
Les big data KU Leuven
Les big data KU LeuvenLes big data KU Leuven
Les big data KU Leuven
 
Chan thuong nguc
Chan thuong ngucChan thuong nguc
Chan thuong nguc
 
03 conversores cc ca (inversores)
03 conversores cc ca (inversores)03 conversores cc ca (inversores)
03 conversores cc ca (inversores)
 
Några myter om dubbade och odubbade vinterdäck
Några myter om dubbade och odubbade vinterdäckNågra myter om dubbade och odubbade vinterdäck
Några myter om dubbade och odubbade vinterdäck
 

Similar a Testing with Python, Pytest and Vim

Pysys testframework
Pysys testframeworkPysys testframework
Pysys testframeworkMoray Grieve
 
(ATS3-DEV02) Scripting with .NET Assemblies in Symyx Notebook
(ATS3-DEV02) Scripting with .NET Assemblies in Symyx Notebook(ATS3-DEV02) Scripting with .NET Assemblies in Symyx Notebook
(ATS3-DEV02) Scripting with .NET Assemblies in Symyx NotebookBIOVIA
 
(ATS6-APP09) ELN configuration management with ADM
(ATS6-APP09) ELN configuration management with ADM(ATS6-APP09) ELN configuration management with ADM
(ATS6-APP09) ELN configuration management with ADMBIOVIA
 
Dspace4 150227090306-conversion-gate01
Dspace4 150227090306-conversion-gate01Dspace4 150227090306-conversion-gate01
Dspace4 150227090306-conversion-gate01walaba06
 
DSpace 4.2 Basics & Configuration
DSpace 4.2 Basics & ConfigurationDSpace 4.2 Basics & Configuration
DSpace 4.2 Basics & ConfigurationDuraSpace
 
Linux Container Primitives and Runtimes (CON407-R1) - AWS re:Invent 2018
Linux Container Primitives and Runtimes (CON407-R1) - AWS re:Invent 2018Linux Container Primitives and Runtimes (CON407-R1) - AWS re:Invent 2018
Linux Container Primitives and Runtimes (CON407-R1) - AWS re:Invent 2018Amazon Web Services
 
Week 5 open session
Week 5 open sessionWeek 5 open session
Week 5 open sessionRandall Rode
 
Subversion
SubversionSubversion
Subversionrchakra
 
Automated Testing Environment by Bugzilla, Testopia and Jenkins
Automated Testing Environment by Bugzilla, Testopia and JenkinsAutomated Testing Environment by Bugzilla, Testopia and Jenkins
Automated Testing Environment by Bugzilla, Testopia and Jenkinswalkerchang
 
CNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X SystemsCNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X SystemsSam Bowne
 
Agile db testing_techniques
Agile db testing_techniquesAgile db testing_techniques
Agile db testing_techniquesTarik Essawi
 
Automated Testing with Docker on Steroids - nlOUG TechExperience 2018 (Amersf...
Automated Testing with Docker on Steroids - nlOUG TechExperience 2018 (Amersf...Automated Testing with Docker on Steroids - nlOUG TechExperience 2018 (Amersf...
Automated Testing with Docker on Steroids - nlOUG TechExperience 2018 (Amersf...Lucas Jellema
 
SFDC Deployments
SFDC DeploymentsSFDC Deployments
SFDC DeploymentsSujit Kumar
 
Adding unit tests to the database deployment pipeline
Adding unit tests to the database deployment pipelineAdding unit tests to the database deployment pipeline
Adding unit tests to the database deployment pipelineEduardo Piairo
 
Ts windchill data_loading
Ts windchill data_loadingTs windchill data_loading
Ts windchill data_loadingKhalil Bouali
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the BasicsUlrich Krause
 
Big data key-value and column stores redis - cassandra
Big data  key-value and column stores redis - cassandraBig data  key-value and column stores redis - cassandra
Big data key-value and column stores redis - cassandraJWORKS powered by Ordina
 

Similar a Testing with Python, Pytest and Vim (20)

Pysys testframework
Pysys testframeworkPysys testframework
Pysys testframework
 
(ATS3-DEV02) Scripting with .NET Assemblies in Symyx Notebook
(ATS3-DEV02) Scripting with .NET Assemblies in Symyx Notebook(ATS3-DEV02) Scripting with .NET Assemblies in Symyx Notebook
(ATS3-DEV02) Scripting with .NET Assemblies in Symyx Notebook
 
(ATS6-APP09) ELN configuration management with ADM
(ATS6-APP09) ELN configuration management with ADM(ATS6-APP09) ELN configuration management with ADM
(ATS6-APP09) ELN configuration management with ADM
 
Dspace4 150227090306-conversion-gate01
Dspace4 150227090306-conversion-gate01Dspace4 150227090306-conversion-gate01
Dspace4 150227090306-conversion-gate01
 
DSpace 4.2 Basics & Configuration
DSpace 4.2 Basics & ConfigurationDSpace 4.2 Basics & Configuration
DSpace 4.2 Basics & Configuration
 
Linux Container Primitives and Runtimes (CON407-R1) - AWS re:Invent 2018
Linux Container Primitives and Runtimes (CON407-R1) - AWS re:Invent 2018Linux Container Primitives and Runtimes (CON407-R1) - AWS re:Invent 2018
Linux Container Primitives and Runtimes (CON407-R1) - AWS re:Invent 2018
 
Week 5 open session
Week 5 open sessionWeek 5 open session
Week 5 open session
 
Subversion
SubversionSubversion
Subversion
 
Automated Testing Environment by Bugzilla, Testopia and Jenkins
Automated Testing Environment by Bugzilla, Testopia and JenkinsAutomated Testing Environment by Bugzilla, Testopia and Jenkins
Automated Testing Environment by Bugzilla, Testopia and Jenkins
 
CNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X SystemsCNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X Systems
 
System Programming and Administration
System Programming and AdministrationSystem Programming and Administration
System Programming and Administration
 
Bug zillatestopiajenkins
Bug zillatestopiajenkinsBug zillatestopiajenkins
Bug zillatestopiajenkins
 
Nuclei.pptx
Nuclei.pptxNuclei.pptx
Nuclei.pptx
 
Agile db testing_techniques
Agile db testing_techniquesAgile db testing_techniques
Agile db testing_techniques
 
Automated Testing with Docker on Steroids - nlOUG TechExperience 2018 (Amersf...
Automated Testing with Docker on Steroids - nlOUG TechExperience 2018 (Amersf...Automated Testing with Docker on Steroids - nlOUG TechExperience 2018 (Amersf...
Automated Testing with Docker on Steroids - nlOUG TechExperience 2018 (Amersf...
 
SFDC Deployments
SFDC DeploymentsSFDC Deployments
SFDC Deployments
 
Adding unit tests to the database deployment pipeline
Adding unit tests to the database deployment pipelineAdding unit tests to the database deployment pipeline
Adding unit tests to the database deployment pipeline
 
Ts windchill data_loading
Ts windchill data_loadingTs windchill data_loading
Ts windchill data_loading
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the Basics
 
Big data key-value and column stores redis - cassandra
Big data  key-value and column stores redis - cassandraBig data  key-value and column stores redis - cassandra
Big data key-value and column stores redis - cassandra
 

Último

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Último (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Testing with Python, Pytest and Vim

  • 1. TDD with python, pytest and vim Setting up
  • 2. Getting Started • pip install pytest • pip install pytest-xdist • If you are using Anaconda, pytest should already be installed
  • 3. Directory/Folder structure Create a tests folder in your project directory Test data for testing dataframes Name corresponding test files with a test_ infront
  • 4. Using VIM • Open vim <filename> in the root directory • Enter :vsplit <tests/filename> in vim’s console • You will get a split window. • Ctrl-wx to swap columns in the order of preference. I.e. code on left, test on right or vice versa • Ctrl-ww to switch editing columns
  • 5. Using VIM - vsplit CODE TESTS
  • 6. Using VIM – vsplit Cursor Here shows where you are editing code testsCtrl-ww
  • 7. Pytest • Run pytest -f -v in the root of your project directory • Pytest will be watching for any changes in the code or tests. • Once you save either file, it will re- run all tests automatically