Skip to content

Instantly share code, notes, and snippets.

Allan Lewis allanlewis

View GitHub Profile
View keybase.md

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 Aug 18, 2017
A Makefile for managing Python requirements in a sane way without extra Python tools.
View Makefile
python ?= python3
pip := pip --disable-pip-version-check
export PATH := .env/bin:$(PATH)
#######################
# Python environments #
#######################
.env:
@allanlewis
allanlewis / ClassWithListener.java
Created Aug 31, 2016 — forked from krmahadevan/ClassWithListener
Demo that shows how to make use of Event Firing Web Driver.
View ClassWithListener.java
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;
@allanlewis
allanlewis / build.xml
Last active Aug 18, 2017
A configuration for Ant to generate a report based on a JUnit XML file.
View build.xml
<?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 / pytest_newline_before_output.py
Last active Oct 19, 2018
A Pytest fixture that prints a newline before any other output when running with `-s` (`--capture=no`)
View pytest_newline_before_output.py
@pytest.yield_fixture(autouse=True)
def newline_before_logging(request):
if request.config.getoption('capture') == 'no':
print() # new-line
yield
You can’t perform that action at this time.