I hereby claim:
- I am ryanc414 on github.
- I am ryancollingham (https://keybase.io/ryancollingham) on keybase.
- I have a public key ASAvgp8W8UPvJBqekJpsLX9D56UmCXTlkl2ZLm7noYDfowo
To claim this, I am signing this object:
#!/bin/bash | |
# Remove merged git branches locally and on remote(s) | |
set -e | |
# Script constants | |
BRANCH_WHITELIST="(\*|master|other-special-branches)" | |
REMOTES="origin" # Add more remotes here as space-separated list | |
echo "Deleting merged branches locally" |
I hereby claim:
To claim this, I am signing this object:
package main | |
import ( | |
"flag" | |
"fmt" | |
"html" | |
"net" | |
"net/http" | |
) |
"""Example usage of pytest fixtures.""" | |
import subprocess | |
import re | |
import pytest | |
import requests | |
class App: |
@pytest.fixture | |
def app(): | |
app = App() | |
print("Starting app") | |
app.start() | |
yield app | |
print("Stopping app") | |
app.stop() | |
@pytest.fixture(scope="module") | |
def app(): | |
app = App() | |
print("Starting app") | |
app.start() | |
yield app | |
print("Stopping app") | |
app.stop() | |
# First test with the default port, then test using a fixed port | |
# number. | |
@pytest.fixture(scope="module", params=[None, 9999]) | |
def app(request): | |
app = App(port=request.param) | |
print("Starting app") | |
app.start() | |
yield app | |
print("Stopping app") | |
app.stop() |
class AppClient: | |
def __init__(self, app_addr): | |
self._app_addr = app_addr | |
def request(self, method, path): | |
return requests.request(method, f"{self._app_addr}{path}") | |
@pytest.fixture(scope="function") | |
def app_client(app): |
package main | |
import ( | |
"encoding/json" | |
"errors" | |
"flag" | |
"fmt" | |
"io/ioutil" | |
"os" | |
) |
package main | |
import ( | |
"fmt" | |
"container/list" | |
) | |
func main() { | |
l := list.New() | |
l.PushBack(2) |