Search

29 August, 2018

Python: Saving regular expression results in variables directly

Python Regular expressions has a powerful tools under it's regular expressions module which lets you create variables and save your search results directly.

It is called named groups . When you search for something and you want to save it in a variable when found, this is what you should use.

Setting your first Jenkins project.

Setup Jenkins on your local PC in minutes


Since you are here, I am assuming that you are trying to find out ,  how to start with Jenkins and you have no clue about it . If it's true, then you are in the best place possible .

This is a blog on Jenkins setup for those guys who have absolutely no idea what to do or where to start.

24 August, 2018

Regular Expressions: Look ahead and Look behind

Regular expressions are fun. There are two important concepts that are quite often sought for. Find something based on content that follows our search pattern . OR. Find something based on content that lies ahead. Let's see some examples to see what I mean.

LOOK AHEAD

LOOK AHEAD means , I want to see what lies ahead first, and then decide, to do something now.


Syntax of regex pattern:  pattern1(?=pattern2)


14 August, 2018

Calling Flask URL from a script tag

The goal is , to call a FLASK route without reloading the page, when a button is pressed. The content of a div must change with the response text received from the flask route call.

13 August, 2018

How to use Python unit test module and it's methods?

Unit test module is an in-build library in python, used to write test scripts . It gives some helpful methods while helps us designing out test in a way , that emulates a real production environment.

While writing test, we need to keep these things in mind

1. Test should start with a clean slate. Meaning the subject under test must not hold any info or be in a state, that might affect the test results.

2. Every tests should test one and only one feature . Clubbing multiple tests in one test,  is a bad idea.

Unit test provides some special methods. These can be used to handle the flow of tests as per scenario. Below is a generic template of a unit test showing all methods and their tasks.