Skip to content

Commit 5a79c76

Browse files
authored
Merge pull request chubin#313 from chubin/fix-tests
Fix tests.
2 parents 6d83c4d + e50a9f9 commit 5a79c76

File tree

9 files changed

+72
-34
lines changed

9 files changed

+72
-34
lines changed

tests/results/10

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# How do I copy a file in Python?
2-
# 
3-
# shutil (http://docs.python.org/3/library/shutil.html) has many methods
4-
# you can use. One of which is:
1+
# How do I copy a file in Python?
2+
# 
3+
# shutil (http://docs.python.org/3/library/shutil.html) has many methods
4+
# you can use. One of which is:
55

66
from shutil import copyfile
77

88
copyfile(src, dst)
99

10-
# Copy the contents of the file named src to a file named dst. The
11-
# destination location must be writable; otherwise, an IOError exception
12-
# will be raised. If dst already exists, it will be replaced. Special
13-
# files such as character or block devices and pipes cannot be copied
14-
# with this function. src and dst are path names given as strings.
15-
# 
16-
# [Swati] [so/q/123198] [cc by-sa 3.0]
10+
# Copy the contents of the file named src to a file named dst. The
11+
# destination location must be writable; otherwise, an IOError exception
12+
# will be raised. If dst already exists, it will be replaced. Special
13+
# files such as character or block devices and pipes cannot be copied
14+
# with this function. src and dst are path names given as strings.
15+
# 
16+
# [Swati] [so/q/123198] [cc by-sa 3.0]

tests/results/15

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@
460460
 pass # Multiple exceptions can be handled together, if required.
461461
else: # Optional clause to the try/except block. Must follow all except blocks
462462
 print("All good!") # Runs only if the code in try raises no exceptions
463-
finally: # Execute under all circumstances
463+
finally: # Execute under all circumstances
464464
 print("We can clean up resources here")
465465

466466
# Instead of try/finally to cleanup resources you can use a with statement
@@ -713,7 +713,7 @@
713713
 return "*grunt*"
714714

715715
 # A property is just like a getter.
716-
 # It turns the method age() into an read-only attribute of the same name.
716+
 # It turns the method age() into a read-only attribute of the same name.
717717
 # There's no need to write trivial getters and setters in Python, though.
718718
 @property
719719
 def age(self):

tests/results/16

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
1ns Main memory reference: Send 2,000 bytes Read 1,000,000 bytes
44
▗▖ 100ns over commodity network: sequentially from SSD:
5-
▗▖ 44ns 48.981us
5+
▗▖ 31ns 38.876us
66
L1 cache reference: 1ns ▗ ▗ 
77
▗▖ 1.0us
8-
▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ SSD random read: 16.0us Disk seek: 2.499999ms
8+
▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ SSD random read: 16.0us Disk seek: 2.332582ms
99
Branch mispredict: 3ns  ▗▖▗ ▗▖▗▖ 
1010
▗▖▗▖▗▖ 
1111
Compress 1KB wth Snappy: Read 1,000,000 bytes Read 1,000,000 bytes
1212
L2 cache reference: 4ns 2.0us sequentially from memory: sequentially from disk:
13-
▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 2.967us 824.692us
13+
▗▖▗▖▗▖▗▖ ▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ 2.355us 717.936us
1414
▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖ ▗ ▗ 
1515
Mutex lock/unlock: 16ns  
1616
▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖▗▖  Round trip Packet roundtrip

tests/results/17

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
# Show storage accounts
4747
az storage account list --output table
4848

49-
# Show contaniers for an account
49+
# Show containers for an account
5050
az storage container list --account-name mystorageaccount --output table
5151

5252
# Show blobs in a container
@@ -98,6 +98,7 @@
9898
 tldr:az 
9999
# az
100100
# The official CLI tool for Microsoft Azure.
101+
# Some subcommands such as `az login` have their own usage documentation.
101102
# More information: <https://docs.microsoft.com/cli/azure>.
102103

103104
# Log in to Azure:

tests/results/2

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
 tldr:ls 
2121
# ls
2222
# List directory contents.
23+
# More information: <https://www.gnu.org/software/coreutils/ls>.
2324

2425
# List files one per line:
2526
ls -1
@@ -30,14 +31,17 @@
3031
# List all files, with trailing `/` added to directory names:
3132
ls -F
3233

33-
# Long format list (permissions, ownership, size and modification date) of all files:
34+
# Long format list (permissions, ownership, size, and modification date) of all files:
3435
ls -la
3536

36-
# Long format list with size displayed using human readable units (KB, MB, GB):
37+
# Long format list with size displayed using human-readable units (KiB, MiB, GiB):
3738
ls -lh
3839

3940
# Long format list sorted by size (descending):
4041
ls -lS
4142

4243
# Long format list of all files, sorted by modification date (oldest first):
4344
ls -ltr
45+
46+
# Only list directories:
47+
ls -d */

tests/results/3

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ ls -d .*/ */ <dir>
1919
#[tldr:ls]
2020
# ls
2121
# List directory contents.
22+
# More information: <https://www.gnu.org/software/coreutils/ls>.
2223

2324
# List files one per line:
2425
ls -1
@@ -29,14 +30,17 @@ ls -a
2930
# List all files, with trailing `/` added to directory names:
3031
ls -F
3132

32-
# Long format list (permissions, ownership, size and modification date) of all files:
33+
# Long format list (permissions, ownership, size, and modification date) of all files:
3334
ls -la
3435

35-
# Long format list with size displayed using human readable units (KB, MB, GB):
36+
# Long format list with size displayed using human-readable units (KiB, MiB, GiB):
3637
ls -lh
3738

3839
# Long format list sorted by size (descending):
3940
ls -lS
4041

4142
# Long format list of all files, sorted by modification date (oldest first):
4243
ls -ltr
44+
45+
# Only list directories:
46+
ls -d */

tests/results/4

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
# data to be redundant and metadata to be non-redundant:
1010
mkfs.btrfs -m raid0 -d raid1 /dev/sdb /dev/sdc /dev/sdd
1111

12-
# both data and metadata to be redundan
12+
# both data and metadata to be redundant
1313
mkfs.btrfs -d raid1 /dev/sdb /dev/sdc /dev/sdd
1414

1515
# To get a list of all btrfs file systems
1616
btrfs filesystem show
1717

18-
# detailed df for a fileesystem (mounted in /mnt)
18+
# detailed df for a filesystem (mounted in /mnt)
1919
btrfs filesystem df /mnt
2020

2121
# resize btrfs online (-2g decreases, +2g increases)
@@ -57,6 +57,8 @@
5757
 tldr:btrfs 
5858
# btrfs
5959
# A filesystem based on the copy-on-write (COW) principle for Linux.
60+
# Some subcommands such as `btrfs device` have their own usage documentation.
61+
# More information: <https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs>.
6062

6163
# Create subvolume:
6264
sudo btrfs subvolume create path/to/subvolume

tests/results/5

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,30 @@
2626

2727
# Show quota:
2828
sudo btrfs qgroup show path/to/subvolume
29+
30+
 tldr:btrfs-filesystem 
31+
# Defragment a directory recursively (does not cross subvolume boundaries):
32+
sudo btrfs filesystem defragment -v -r path/to/directory
33+
34+
 tldr:btrfs-subvolume 
35+
# btrfs subvolume
36+
# Manage btrfs subvolumes and snapshots.
37+
# More information: <https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-subvolume>.
38+
39+
# Create a new empty subvolume:
40+
sudo btrfs subvolume create path/to/new_subvolume
41+
42+
# List all subvolumes and snapshots in the specified filesystem:
43+
sudo btrfs subvolume list path/to/btrfs_filesystem
44+
45+
# Delete a subvolume:
46+
sudo btrfs subvolume delete path/to/subvolume
47+
48+
# Create a read-only snapshot of an existing subvolume:
49+
sudo btrfs subvolume snapshot -r path/to/source_subvolume path/to/target
50+
51+
# Create a read-write snapshot of an existing subvolume:
52+
sudo btrfs subvolume snapshot path/to/source_subvolume path/to/target
53+
54+
# Show detailed information about a subvolume:
55+
sudo btrfs subvolume show path/to/subvolume

tests/results/9

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# How do I copy a file in Python?
2-
# 
3-
# shutil (http://docs.python.org/3/library/shutil.html) has many methods
4-
# you can use. One of which is:
1+
# How do I copy a file in Python?
2+
# 
3+
# shutil (http://docs.python.org/3/library/shutil.html) has many methods
4+
# you can use. One of which is:
55

66
from shutil import copyfile
77

88
copyfile(src, dst)
99

10-
# Copy the contents of the file named src to a file named dst. The
11-
# destination location must be writable; otherwise, an IOError exception
12-
# will be raised. If dst already exists, it will be replaced. Special
13-
# files such as character or block devices and pipes cannot be copied
14-
# with this function. src and dst are path names given as strings.
15-
# 
16-
# [Swati] [so/q/123198] [cc by-sa 3.0]
10+
# Copy the contents of the file named src to a file named dst. The
11+
# destination location must be writable; otherwise, an IOError exception
12+
# will be raised. If dst already exists, it will be replaced. Special
13+
# files such as character or block devices and pipes cannot be copied
14+
# with this function. src and dst are path names given as strings.
15+
# 
16+
# [Swati] [so/q/123198] [cc by-sa 3.0]

0 commit comments

Comments
 (0)