Skip to content

Instantly share code, notes, and snippets.

View allanlewis's full-sized avatar

Allan Lewis allanlewis

View GitHub Profile
@allanlewis
allanlewis / README.md
Last active January 12, 2022 17:38
Italian first & last names
@allanlewis
allanlewis / pytest_newline_before_output.py
Last active October 19, 2018 19:25
A Pytest fixture that prints a newline before any other output when running with `-s` (`--capture=no`)
@pytest.yield_fixture(autouse=True)
def newline_before_logging(request):
if request.config.getoption('capture') == 'no':
print() # new-line
yield

Keybase proof

I hereby claim:

  • I am allanlewis on github.
  • I am allanlewis (https://keybase.io/allanlewis) on keybase.
  • I have a public key ASBePRIeLQnucZrHS32UGuCF708wrCf996dBzvmne8fDago

To claim this, I am signing this object:

@allanlewis
allanlewis / Makefile
Last active August 18, 2017 14:58
A Makefile for managing Python requirements in a sane way without extra Python tools.
python ?= python3
pip := pip --disable-pip-version-check
export PATH := .env/bin:$(PATH)
#######################
# Python environments #
#######################
.env:
@allanlewis
allanlewis / build.xml
Last active August 18, 2017 09:48
A configuration for Ant to generate a report based on a JUnit XML file.
<?xml version="1.0" encoding="UTF-8"?>
<project name="JUnit Reporter" basedir="." default="main">
<mkdir dir="reports" />
<target name="junit">
<junitreport todir="./reports">
<fileset dir=".">
<include name="junit.xml"/>
</fileset>
<report format="frames" todir="./reports/frames" />
<report format="noframes" todir="./reports/noframes" />
@allanlewis
allanlewis / ClassWithListener.java
Created August 31, 2016 09:01 — forked from krmahadevan/ClassWithListener
Demo that shows how to make use of Event Firing Web Driver.
package com.test;
import java.net.MalformedURLException;
import java.net.URL;
import org.openqa.selenium.By;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.support.events.EventFiringWebDriver;
import org.testng.annotations.Test;