创建测试文件
1 测试文件语法
1.1 测试用例文件和目录的组织层次结构
- 测试用例在测试用例文件中创建;
- 一个测试用例文件自动的创建一个包含文件中所有测试用例的测试集;
start new:
tmux
start new with session name:
tmux new -s myname
#!/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 |
# 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' |
# The get() method on dicts | |
# and its "default" argument | |
name_for_userid = { | |
382: "Alice", | |
590: "Bob", | |
951: "Dilbert", | |
} | |
def greeting(userid): |
(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo | |
echo usage: $0 network-interface | |
echo | |
echo e.g. $0 eth0 | |
echo | |
echo shows packets-per-second |
# 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 |
# | |
# 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. |
--- Emacs Hammerspoon Script | |
-- Author: Justin Tanner | |
-- Email: work@jwtanner.com | |
-- 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 |