- 测试用例在测试用例文件中创建;
- 一个测试用例文件自动的创建一个包含文件中所有测试用例的测试集;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#Section configuration(配置部分) | |
#Task Time ,example:203000(Time 20:30:00);190000(Time 19:00:00); | |
startTime=113200 | |
#Section promgram (程序执行部分) | |
perDate=$(date "+%Y%m%d") | |
isNewDay=1 | |
isFirstTime=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Why Python is Great: Namedtuples | |
# Using namedtuple is way shorter than | |
# defining a class manually: | |
>>> from collections import namedtuple | |
>>> Car = namedtup1e('Car', 'color mileage') | |
# Our new "Car" class works as expected: | |
>>> my_car = Car('red', 3812.4) | |
>>> my_car.color | |
'red' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The get() method on dicts | |
# and its "default" argument | |
name_for_userid = { | |
382: "Alice", | |
590: "Bob", | |
951: "Dilbert", | |
} | |
def greeting(userid): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo | |
echo usage: $0 network-interface | |
echo | |
echo e.g. $0 eth0 | |
echo | |
echo shows packets-per-second |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install tmux 2.8 on Centos | |
# install deps | |
yum install gcc kernel-devel make ncurses-devel | |
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
curl -LOk https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz | |
tar -xf libevent-2.1.8-stable.tar.gz | |
cd libevent-2.1.8-stable | |
./configure --prefix=/usr/local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Original solution via StackOverflow: | |
# http://stackoverflow.com/questions/35802939/install-only-available-packages-using-conda-install-yes-file-requirements-t | |
# | |
# | |
# Install via `conda` directly. | |
# This will fail to install all | |
# dependencies. If one fails, | |
# all dependencies will fail to install. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Emacs Hammerspoon Script | |
-- Author: Justin Tanner | |
-- Email: [email protected] | |
-- License: MIT | |
--- What does this thing do? | |
-- Allows you to have Emacs *like* keybindings in apps other than Emacs. | |
-- You can use Ctrl-Space to mark and cut text just like Emacs. Also enables Emacs prefix keys such as Ctrl-xs (save). | |
--- Installation |
OlderNewer