SlideShare a Scribd company logo
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

More Related Content

Viewers also liked

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
Manuel Colmenero
 
TLC
TLCTLC
Semestrario Esparza Herrera Ramón
Semestrario Esparza Herrera RamónSemestrario Esparza Herrera Ramón
Semestrario Esparza Herrera Ramón
Ramon Herrera
 
Aplicaciones de Herramientas
Aplicaciones de HerramientasAplicaciones de Herramientas
Aplicaciones de Herramientas
dayitagaona08
 
Becoming an Influencer: Strategies for Change
Becoming an Influencer: Strategies for ChangeBecoming an Influencer: Strategies for Change
Becoming an Influencer: Strategies for Change
Dr. Ed Cabellon
 
Ondas y sonido
Ondas y sonidoOndas y sonido
Ondas y sonido
Diego Duarte Mella
 
Practical Guide to Product Roadmapping
Practical Guide to Product RoadmappingPractical Guide to Product Roadmapping
Practical Guide to Product Roadmapping
Joe Granda
 
Scooters for sale
Scooters for saleScooters for sale
Scooters for sale
powerrideoutlet
 
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
Epstein Becker Green
 
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
UPEL-IMPM; MPPE (UE. BRICEÑO MÉNDEZ)
 
Flink meetup
Flink   meetupFlink   meetup
Flink meetup
Christos Hadjinikolis
 
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! UnConference
nexxworks
 
Digipak case study
Digipak case studyDigipak case study
Digipak case study
Charley Easter
 
McGregor Boyall Asia Pacific Brochure
McGregor Boyall Asia Pacific BrochureMcGregor Boyall Asia Pacific Brochure
McGregor Boyall Asia Pacific Brochure
McGregor Boyall
 
Les big data KU Leuven
Les big data KU LeuvenLes big data KU Leuven
Les big data KU Leuven
Ward Hemeryck
 
Chan thuong nguc
Chan thuong ngucChan thuong nguc
Chan thuong nguc
Phong Kiều
 
03 conversores cc ca (inversores)
03 conversores cc ca (inversores)03 conversores cc ca (inversores)
03 conversores cc ca (inversores)
Julio Magalhaes de Freitas
 
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
Johan Granlund
 

Viewers also liked (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 to Testing with Python, Pytest and Vim

Pysys testframework
Pysys testframeworkPysys testframework
Pysys testframework
Moray 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 Notebook
BIOVIA
 
(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
BIOVIA
 
Dspace4 150227090306-conversion-gate01
Dspace4 150227090306-conversion-gate01Dspace4 150227090306-conversion-gate01
Dspace4 150227090306-conversion-gate01
walaba06
 
DSpace 4.2 Basics & Configuration
DSpace 4.2 Basics & ConfigurationDSpace 4.2 Basics & Configuration
DSpace 4.2 Basics & Configuration
DuraSpace
 
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
Amazon Web Services
 
Week 5 open session
Week 5 open sessionWeek 5 open session
Week 5 open session
Randall Rode
 
Subversion
SubversionSubversion
Subversion
rchakra
 
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
walkerchang
 
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
Sam Bowne
 
System Programming and Administration
System Programming and AdministrationSystem Programming and Administration
System Programming and Administration
Krasimir Berov (Красимир Беров)
 
Bug zillatestopiajenkins
Bug zillatestopiajenkinsBug zillatestopiajenkins
Bug zillatestopiajenkins
Samira Kumar Nanda
 
Nuclei.pptx
Nuclei.pptxNuclei.pptx
Nuclei.pptx
sumithec12
 
Agile db testing_techniques
Agile db testing_techniquesAgile db testing_techniques
Agile db testing_techniques
Tarik 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 Deployments
Sujit 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 pipeline
Eduardo Piairo
 
Ts windchill data_loading
Ts windchill data_loadingTs windchill data_loading
Ts windchill data_loading
Khalil Bouali
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the Basics
Ulrich 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 - cassandra
JWORKS powered by Ordina
 

Similar to 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
 

Recently uploaded

Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 

Recently uploaded (20)

Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 

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