add test files

This commit is contained in:
2018-12-12 14:56:48 -08:00
parent 26ea272114
commit 9c5a1b18f0
14 changed files with 114035 additions and 80 deletions

View File

@@ -19,6 +19,7 @@ from io import StringIO
class Test_Persistence(unittest.TestCase):
def setUp(self):
if not os.path.exists("test_output"):
os.mkdir("test_output")
@@ -40,7 +41,7 @@ class Test_Persistence(unittest.TestCase):
os.remove(test_file)
call = self.base_call.format(self.input_file, self.test_output_dir)
call = call + " --url-encode --persistence sequence --collapse-user"
call = call + " --url-encode --persistence sequence"
print(os.path.abspath('.'))
print(call)
proc = subprocess.Popen(call,stdout=subprocess.PIPE,shell=True)
@@ -51,17 +52,17 @@ class Test_Persistence(unittest.TestCase):
# as a test let's make sure that we get equal data frames
test = pd.read_table(test_file)
self.assertEqual(test['tokens_added'][0],4)
self.assertEqual(test['tokens_added'][1],5)
self.assertEqual(test['tokens_added'][0],7)
self.assertEqual(test['tokens_added'][1],10)
self.assertEqual(test['tokens_added'][2],0)
self.assertEqual(test['tokens_added'][3],6)
self.assertEqual(test['tokens_added'][4],4)
self.assertEqual(test['tokens_added'][3],8)
self.assertEqual(test['tokens_added'][4],0)
self.assertEqual(test['tokens_removed'][0],0)
self.assertEqual(test['tokens_removed'][1],0)
self.assertEqual(test['tokens_removed'][2],5)
self.assertEqual(test['tokens_removed'][2],0)
self.assertEqual(test['tokens_removed'][3],4)
self.assertEqual(test['tokens_removed'][4],6)
self.assertEqual(test['token_revs'][0],4*3)
self.assertEqual(test['tokens_removed'][4],0)
self.assertEqual(test['token_revs'][0],8*3)
self.assertEqual(test['token_revs'][1],0)
self.assertEqual(test['token_revs'][2],0)
self.assertEqual(test['token_revs'][3],0)
@@ -69,7 +70,44 @@ class Test_Persistence(unittest.TestCase):
baseline = pd.read_table(baseline_file)
assert_frame_equal(test,baseline)
def test_legacy_persistence(self):
test_filename = "legacy-" + self.wikiq_out_name
test_file = os.path.join(self.test_output_dir, test_filename)
if os.path.exists(test_file):
os.remove(test_file)
call = self.base_call.format(self.input_file, self.test_output_dir)
call = call + " --url-encode --persistence legacy"
print(os.path.abspath('.'))
print(call)
proc = subprocess.Popen(call,stdout=subprocess.PIPE,shell=True)
proc.wait()
copyfile(self.call_output, test_file)
baseline_file = os.path.join(".", self.baseline_output_dir, test_filename)
# as a test let's make sure that we get equal data frames
test = pd.read_table(test_file)
self.assertEqual(test['tokens_added'][0],7)
self.assertEqual(test['tokens_added'][1],10)
self.assertEqual(test['tokens_added'][2],0)
self.assertEqual(test['tokens_added'][3],11)
self.assertEqual(test['tokens_added'][4],0)
self.assertEqual(test['tokens_removed'][0],0)
self.assertEqual(test['tokens_removed'][1],0)
self.assertEqual(test['tokens_removed'][2],0)
self.assertEqual(test['tokens_removed'][3],7)
self.assertEqual(test['tokens_removed'][4],0)
self.assertEqual(test['token_revs'][0],7*3)
self.assertEqual(test['token_revs'][1],0)
self.assertEqual(test['token_revs'][2],0)
self.assertEqual(test['token_revs'][3],0)
self.assertEqual(test['token_revs'][4],0)
baseline = pd.read_table(baseline_file)
assert_frame_equal(test,baseline)
class Test_Persistence_Bug(unittest.TestCase):
@@ -135,6 +173,7 @@ class Test_Wikipedia(unittest.TestCase):
call = self.base_call.format(self.input_file, self.test_output_dir)
call = call + " --url-encode"
print(call)
proc = subprocess.Popen(call,stdout=subprocess.PIPE,shell=True)
proc.wait()
@@ -195,6 +234,7 @@ class Test_Basic(unittest.TestCase):
os.remove(test_file)
call = self.base_call.format(self.input_file, self.test_output_dir)
print(call)
proc = subprocess.Popen(call,stdout=subprocess.PIPE,shell=True)
proc.wait()
@@ -216,6 +256,7 @@ class Test_Basic(unittest.TestCase):
call = self.base_call.format(self.input_file, self.test_output_dir)
call = call + " --collapse-user"
print(call)
proc = subprocess.Popen(call,stdout=subprocess.PIPE,shell=True)
proc.wait()
@@ -256,6 +297,7 @@ class Test_Basic(unittest.TestCase):
call = self.base_call.format(self.input_file, self.test_output_dir)
call = call + " --persistence legacy"
print(call)
proc = subprocess.Popen(call,stdout=subprocess.PIPE,shell=True)
proc.wait()
@@ -275,6 +317,7 @@ class Test_Basic(unittest.TestCase):
call = self.base_call.format(self.input_file, self.test_output_dir)
call = call + " --persistence"
print(call)
proc = subprocess.Popen(call,stdout=subprocess.PIPE,shell=True)
proc.wait()
@@ -297,7 +340,9 @@ class Test_Basic(unittest.TestCase):
call = self.base_call.format(self.input_file, self.test_output_dir)
call = call + " --url-encode"
print(call)
proc = subprocess.Popen(call,stdout=subprocess.PIPE,shell=True)
proc.wait()
copyfile(self.call_output, test_file)
@@ -326,6 +371,7 @@ class Test_Malformed(unittest.TestCase):
def test_malformed_noargs(self):
call = self.base_call.format(self.input_file, self.test_output_dir)
print(call)
proc = subprocess.Popen(call,stdout=subprocess.PIPE,stderr=subprocess.PIPE, shell=True)
proc.wait()
outs, errs = proc.communicate()
@@ -347,6 +393,7 @@ class Test_Stdout(unittest.TestCase):
def test_noargs(self):
call = self.base_call.format(self.input_file)
print(call)
proc = subprocess.run(call,stdout=subprocess.PIPE,shell=True)
outs = proc.stdout.decode("utf8")

View File

@@ -0,0 +1,15 @@
anon articleid collapsed_revs date_time deleted editor editor_id minor namespace revert reverteds revid sha1 text_chars title token_revs tokens_added tokens_removed tokens_window
TRUE 23397386 3 2010-12-13 02:52:57 FALSE %2276.102.106.52%22 FALSE 0 FALSE 402074089 bdoleau92eed59p01lwu3hx71jfplyv 54928 %22The%20Amazing%20Race%2016%22 118658 19778 0 6
FALSE 23397386 1 2010-12-13 04:44:25 FALSE %22Nmk829%22 12595469 FALSE 0 FALSE 402088763 7zt0ygstumo5fe0fj2xj32mcn1p4p1j 54926 %22The%20Amazing%20Race%2016%22 0 0 0 6
FALSE 23397386 1 2010-12-14 18:31:01 FALSE %22Ryulong%22 889851 FALSE 0 FALSE 402376185 2itumo8i1amz1anlmnvnqcaauk0c6ti 54912 %22The%20Amazing%20Race%2016%22 0 0 6 6
TRUE 23397386 1 2010-12-14 23:12:50 FALSE %22174.1.48.24%22 FALSE 0 FALSE 402421155 27izchr7l6uj5z0p9jc9w8mf5h45w8p 54973 %22The%20Amazing%20Race%2016%22 114 19 0 6
FALSE 23397386 1 2010-12-14 23:18:49 FALSE %22Ryulong%22 889851 FALSE 0 FALSE 402422015 60nmgy7reem6isznmtnjr37qwj3akkb 55013 %22The%20Amazing%20Race%2016%22 102 17 0 6
TRUE 23397386 1 2010-12-15 01:05:24 FALSE %22173.30.1.184%22 FALSE 0 FALSE 402436936 2rf7juf6sx1mi76rgnagt0v1h2vqkka 55033 %22The%20Amazing%20Race%2016%22 0 10 0 6
FALSE 23397386 1 2010-12-15 04:03:25 FALSE %22Kuyabribri%22 1904358 FALSE 0 TRUE "402436936" 402459131 60nmgy7reem6isznmtnjr37qwj3akkb 55013 %22The%20Amazing%20Race%2016%22 0 0 0 6
TRUE 23397386 1 2010-12-16 15:24:08 FALSE %22220.255.1.79%22 FALSE 0 FALSE 402702013 p2u5jcoov0c3396cdih5h2v8azrmb5z 55010 %22The%20Amazing%20Race%2016%22 3320 1030 7 6
TRUE 23397386 1 2010-12-18 10:45:33 FALSE %2258.168.198.160%22 FALSE 0 FALSE 402999028 h9l6spwatmurwxcwcukky37iiozb8dq 55014 %22The%20Amazing%20Race%2016%22 0 2 0 5
FALSE 23397386 1 2010-12-19 01:05:33 FALSE %22Dravecky%22 4588674 TRUE 0 TRUE "402999028" 403103973 p2u5jcoov0c3396cdih5h2v8azrmb5z 55010 %22The%20Amazing%20Race%2016%22 0 0 0 4
FALSE 23397386 1 2010-12-22 12:21:27 FALSE %22Xqbot%22 8066546 TRUE 0 FALSE 403690886 lar0epx20k4qvdj8otqna8v9c1ibtbt 55008 %22The%20Amazing%20Race%2016%22 3162 1054 26 3
TRUE 23397386 1 2011-01-02 10:37:54 FALSE %22118.137.242.186%22 FALSE 0 FALSE 405475313 ipyttx2y54xlilzeihwuaoatcmbcotz 54974 %22The%20Amazing%20Race%2016%22 0 0 0 2
TRUE 23397386 2 2011-01-02 11:08:22 FALSE %2271.133.162.137%22 FALSE 0 FALSE 405478231 lsxi138j1q7qmim71u33kx0qjb4ema6 54976 %22The%20Amazing%20Race%2016%22 0 0 0 1
FALSE 23397386 2 2011-01-02 12:19:03 FALSE %22Dravecky%22 4588674 FALSE 0 TRUE "405478231,405475313" 405484921 lar0epx20k4qvdj8otqna8v9c1ibtbt 55008 %22The%20Amazing%20Race%2016%22 0 0 0 0
1 anon articleid collapsed_revs date_time deleted editor editor_id minor namespace revert reverteds revid sha1 text_chars title token_revs tokens_added tokens_removed tokens_window
2 TRUE 23397386 3 2010-12-13 02:52:57 FALSE %2276.102.106.52%22 FALSE 0 FALSE 402074089 bdoleau92eed59p01lwu3hx71jfplyv 54928 %22The%20Amazing%20Race%2016%22 118658 19778 0 6
3 FALSE 23397386 1 2010-12-13 04:44:25 FALSE %22Nmk829%22 12595469 FALSE 0 FALSE 402088763 7zt0ygstumo5fe0fj2xj32mcn1p4p1j 54926 %22The%20Amazing%20Race%2016%22 0 0 0 6
4 FALSE 23397386 1 2010-12-14 18:31:01 FALSE %22Ryulong%22 889851 FALSE 0 FALSE 402376185 2itumo8i1amz1anlmnvnqcaauk0c6ti 54912 %22The%20Amazing%20Race%2016%22 0 0 6 6
5 TRUE 23397386 1 2010-12-14 23:12:50 FALSE %22174.1.48.24%22 FALSE 0 FALSE 402421155 27izchr7l6uj5z0p9jc9w8mf5h45w8p 54973 %22The%20Amazing%20Race%2016%22 114 19 0 6
6 FALSE 23397386 1 2010-12-14 23:18:49 FALSE %22Ryulong%22 889851 FALSE 0 FALSE 402422015 60nmgy7reem6isznmtnjr37qwj3akkb 55013 %22The%20Amazing%20Race%2016%22 102 17 0 6
7 TRUE 23397386 1 2010-12-15 01:05:24 FALSE %22173.30.1.184%22 FALSE 0 FALSE 402436936 2rf7juf6sx1mi76rgnagt0v1h2vqkka 55033 %22The%20Amazing%20Race%2016%22 0 10 0 6
8 FALSE 23397386 1 2010-12-15 04:03:25 FALSE %22Kuyabribri%22 1904358 FALSE 0 TRUE 402436936 402459131 60nmgy7reem6isznmtnjr37qwj3akkb 55013 %22The%20Amazing%20Race%2016%22 0 0 0 6
9 TRUE 23397386 1 2010-12-16 15:24:08 FALSE %22220.255.1.79%22 FALSE 0 FALSE 402702013 p2u5jcoov0c3396cdih5h2v8azrmb5z 55010 %22The%20Amazing%20Race%2016%22 3320 1030 7 6
10 TRUE 23397386 1 2010-12-18 10:45:33 FALSE %2258.168.198.160%22 FALSE 0 FALSE 402999028 h9l6spwatmurwxcwcukky37iiozb8dq 55014 %22The%20Amazing%20Race%2016%22 0 2 0 5
11 FALSE 23397386 1 2010-12-19 01:05:33 FALSE %22Dravecky%22 4588674 TRUE 0 TRUE 402999028 403103973 p2u5jcoov0c3396cdih5h2v8azrmb5z 55010 %22The%20Amazing%20Race%2016%22 0 0 0 4
12 FALSE 23397386 1 2010-12-22 12:21:27 FALSE %22Xqbot%22 8066546 TRUE 0 FALSE 403690886 lar0epx20k4qvdj8otqna8v9c1ibtbt 55008 %22The%20Amazing%20Race%2016%22 3162 1054 26 3
13 TRUE 23397386 1 2011-01-02 10:37:54 FALSE %22118.137.242.186%22 FALSE 0 FALSE 405475313 ipyttx2y54xlilzeihwuaoatcmbcotz 54974 %22The%20Amazing%20Race%2016%22 0 0 0 2
14 TRUE 23397386 2 2011-01-02 11:08:22 FALSE %2271.133.162.137%22 FALSE 0 FALSE 405478231 lsxi138j1q7qmim71u33kx0qjb4ema6 54976 %22The%20Amazing%20Race%2016%22 0 0 0 1
15 FALSE 23397386 2 2011-01-02 12:19:03 FALSE %22Dravecky%22 4588674 FALSE 0 TRUE 405478231,405475313 405484921 lar0epx20k4qvdj8otqna8v9c1ibtbt 55008 %22The%20Amazing%20Race%2016%22 0 0 0 0

View File

@@ -0,0 +1,6 @@
anon articleid date_time deleted editor editor_id minor namespace revert reverteds revid sha1 text_chars title token_revs tokens_added tokens_removed tokens_window
TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.52%22 FALSE 0 FALSE None e867e7cd0e53b58428b23ee346c6fa523756e7d1 21 %22Test%20Title%22 24 7 0 4
TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.52%22 FALSE 0 FALSE None cb3aeff37c151ab439ee4a7a76cea85679272d5e 44 %22Test%20Title%22 0 10 0 3
TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.52%22 FALSE 0 FALSE None cp0mfp4o90fbpyxooys1rw95zn3ddff 21 %22Test%20Title%22 0 0 0 2
TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.53%22 FALSE 0 FALSE None 9e63d8f3d87be0ed4cc3fab3f750a4429997bead 31 %22Test%20Title%22 0 8 4 1
TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.60%22 FALSE 0 TRUE "None,None,None" None e867e7cd0e53b58428b23ee346c6fa523756e7d1 21 %22Test%20Title%22 0 0 0 0
1 anon articleid date_time deleted editor editor_id minor namespace revert reverteds revid sha1 text_chars title token_revs tokens_added tokens_removed tokens_window
2 TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.52%22 FALSE 0 FALSE None e867e7cd0e53b58428b23ee346c6fa523756e7d1 21 %22Test%20Title%22 24 7 0 4
3 TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.52%22 FALSE 0 FALSE None cb3aeff37c151ab439ee4a7a76cea85679272d5e 44 %22Test%20Title%22 0 10 0 3
4 TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.52%22 FALSE 0 FALSE None cp0mfp4o90fbpyxooys1rw95zn3ddff 21 %22Test%20Title%22 0 0 0 2
5 TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.53%22 FALSE 0 FALSE None 9e63d8f3d87be0ed4cc3fab3f750a4429997bead 31 %22Test%20Title%22 0 8 4 1
6 TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.60%22 FALSE 0 TRUE None,None,None None e867e7cd0e53b58428b23ee346c6fa523756e7d1 21 %22Test%20Title%22 0 0 0 0

View File

@@ -0,0 +1,15 @@
anon articleid collapsed_revs date_time deleted editor editor_id minor namespace revert reverteds revid sha1 text_chars title token_revs tokens_added tokens_removed tokens_window
TRUE 23397386 3 2010-12-13 02:52:57 FALSE %2276.102.106.52%22 FALSE 0 FALSE 402074089 bdoleau92eed59p01lwu3hx71jfplyv 54928 %22The%20Amazing%20Race%2016%22 118658 19778 0 6
FALSE 23397386 1 2010-12-13 04:44:25 FALSE %22Nmk829%22 12595469 FALSE 0 FALSE 402088763 7zt0ygstumo5fe0fj2xj32mcn1p4p1j 54926 %22The%20Amazing%20Race%2016%22 0 0 0 6
FALSE 23397386 1 2010-12-14 18:31:01 FALSE %22Ryulong%22 889851 FALSE 0 FALSE 402376185 2itumo8i1amz1anlmnvnqcaauk0c6ti 54912 %22The%20Amazing%20Race%2016%22 0 0 6 6
TRUE 23397386 1 2010-12-14 23:12:50 FALSE %22174.1.48.24%22 FALSE 0 FALSE 402421155 27izchr7l6uj5z0p9jc9w8mf5h45w8p 54973 %22The%20Amazing%20Race%2016%22 114 19 0 6
FALSE 23397386 1 2010-12-14 23:18:49 FALSE %22Ryulong%22 889851 FALSE 0 FALSE 402422015 60nmgy7reem6isznmtnjr37qwj3akkb 55013 %22The%20Amazing%20Race%2016%22 102 17 0 6
TRUE 23397386 1 2010-12-15 01:05:24 FALSE %22173.30.1.184%22 FALSE 0 FALSE 402436936 2rf7juf6sx1mi76rgnagt0v1h2vqkka 55033 %22The%20Amazing%20Race%2016%22 0 10 0 6
FALSE 23397386 1 2010-12-15 04:03:25 FALSE %22Kuyabribri%22 1904358 FALSE 0 TRUE "402436936" 402459131 60nmgy7reem6isznmtnjr37qwj3akkb 55013 %22The%20Amazing%20Race%2016%22 0 0 0 6
TRUE 23397386 1 2010-12-16 15:24:08 FALSE %22220.255.1.79%22 FALSE 0 FALSE 402702013 p2u5jcoov0c3396cdih5h2v8azrmb5z 55010 %22The%20Amazing%20Race%2016%22 3320 1030 7 6
TRUE 23397386 1 2010-12-18 10:45:33 FALSE %2258.168.198.160%22 FALSE 0 FALSE 402999028 h9l6spwatmurwxcwcukky37iiozb8dq 55014 %22The%20Amazing%20Race%2016%22 0 2 0 5
FALSE 23397386 1 2010-12-19 01:05:33 FALSE %22Dravecky%22 4588674 TRUE 0 TRUE "402999028" 403103973 p2u5jcoov0c3396cdih5h2v8azrmb5z 55010 %22The%20Amazing%20Race%2016%22 0 0 0 4
FALSE 23397386 1 2010-12-22 12:21:27 FALSE %22Xqbot%22 8066546 TRUE 0 FALSE 403690886 lar0epx20k4qvdj8otqna8v9c1ibtbt 55008 %22The%20Amazing%20Race%2016%22 3162 1054 26 3
TRUE 23397386 1 2011-01-02 10:37:54 FALSE %22118.137.242.186%22 FALSE 0 FALSE 405475313 ipyttx2y54xlilzeihwuaoatcmbcotz 54974 %22The%20Amazing%20Race%2016%22 0 0 0 2
TRUE 23397386 2 2011-01-02 11:08:22 FALSE %2271.133.162.137%22 FALSE 0 FALSE 405478231 lsxi138j1q7qmim71u33kx0qjb4ema6 54976 %22The%20Amazing%20Race%2016%22 0 0 0 1
FALSE 23397386 2 2011-01-02 12:19:03 FALSE %22Dravecky%22 4588674 FALSE 0 TRUE "405478231,405475313" 405484921 lar0epx20k4qvdj8otqna8v9c1ibtbt 55008 %22The%20Amazing%20Race%2016%22 0 0 0 0
1 anon articleid collapsed_revs date_time deleted editor editor_id minor namespace revert reverteds revid sha1 text_chars title token_revs tokens_added tokens_removed tokens_window
2 TRUE 23397386 3 2010-12-13 02:52:57 FALSE %2276.102.106.52%22 FALSE 0 FALSE 402074089 bdoleau92eed59p01lwu3hx71jfplyv 54928 %22The%20Amazing%20Race%2016%22 118658 19778 0 6
3 FALSE 23397386 1 2010-12-13 04:44:25 FALSE %22Nmk829%22 12595469 FALSE 0 FALSE 402088763 7zt0ygstumo5fe0fj2xj32mcn1p4p1j 54926 %22The%20Amazing%20Race%2016%22 0 0 0 6
4 FALSE 23397386 1 2010-12-14 18:31:01 FALSE %22Ryulong%22 889851 FALSE 0 FALSE 402376185 2itumo8i1amz1anlmnvnqcaauk0c6ti 54912 %22The%20Amazing%20Race%2016%22 0 0 6 6
5 TRUE 23397386 1 2010-12-14 23:12:50 FALSE %22174.1.48.24%22 FALSE 0 FALSE 402421155 27izchr7l6uj5z0p9jc9w8mf5h45w8p 54973 %22The%20Amazing%20Race%2016%22 114 19 0 6
6 FALSE 23397386 1 2010-12-14 23:18:49 FALSE %22Ryulong%22 889851 FALSE 0 FALSE 402422015 60nmgy7reem6isznmtnjr37qwj3akkb 55013 %22The%20Amazing%20Race%2016%22 102 17 0 6
7 TRUE 23397386 1 2010-12-15 01:05:24 FALSE %22173.30.1.184%22 FALSE 0 FALSE 402436936 2rf7juf6sx1mi76rgnagt0v1h2vqkka 55033 %22The%20Amazing%20Race%2016%22 0 10 0 6
8 FALSE 23397386 1 2010-12-15 04:03:25 FALSE %22Kuyabribri%22 1904358 FALSE 0 TRUE 402436936 402459131 60nmgy7reem6isznmtnjr37qwj3akkb 55013 %22The%20Amazing%20Race%2016%22 0 0 0 6
9 TRUE 23397386 1 2010-12-16 15:24:08 FALSE %22220.255.1.79%22 FALSE 0 FALSE 402702013 p2u5jcoov0c3396cdih5h2v8azrmb5z 55010 %22The%20Amazing%20Race%2016%22 3320 1030 7 6
10 TRUE 23397386 1 2010-12-18 10:45:33 FALSE %2258.168.198.160%22 FALSE 0 FALSE 402999028 h9l6spwatmurwxcwcukky37iiozb8dq 55014 %22The%20Amazing%20Race%2016%22 0 2 0 5
11 FALSE 23397386 1 2010-12-19 01:05:33 FALSE %22Dravecky%22 4588674 TRUE 0 TRUE 402999028 403103973 p2u5jcoov0c3396cdih5h2v8azrmb5z 55010 %22The%20Amazing%20Race%2016%22 0 0 0 4
12 FALSE 23397386 1 2010-12-22 12:21:27 FALSE %22Xqbot%22 8066546 TRUE 0 FALSE 403690886 lar0epx20k4qvdj8otqna8v9c1ibtbt 55008 %22The%20Amazing%20Race%2016%22 3162 1054 26 3
13 TRUE 23397386 1 2011-01-02 10:37:54 FALSE %22118.137.242.186%22 FALSE 0 FALSE 405475313 ipyttx2y54xlilzeihwuaoatcmbcotz 54974 %22The%20Amazing%20Race%2016%22 0 0 0 2
14 TRUE 23397386 2 2011-01-02 11:08:22 FALSE %2271.133.162.137%22 FALSE 0 FALSE 405478231 lsxi138j1q7qmim71u33kx0qjb4ema6 54976 %22The%20Amazing%20Race%2016%22 0 0 0 1
15 FALSE 23397386 2 2011-01-02 12:19:03 FALSE %22Dravecky%22 4588674 FALSE 0 TRUE 405478231,405475313 405484921 lar0epx20k4qvdj8otqna8v9c1ibtbt 55008 %22The%20Amazing%20Race%2016%22 0 0 0 0

View File

@@ -0,0 +1,6 @@
anon articleid date_time deleted editor editor_id minor namespace revert reverteds revid sha1 text_chars title token_revs tokens_added tokens_removed tokens_window
TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.52%22 FALSE 0 FALSE None e867e7cd0e53b58428b23ee346c6fa523756e7d1 21 %22Test%20Title%22 12 4 0 4
TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.52%22 FALSE 0 FALSE None cb3aeff37c151ab439ee4a7a76cea85679272d5e 44 %22Test%20Title%22 0 5 0 3
TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.52%22 FALSE 0 FALSE None cp0mfp4o90fbpyxooys1rw95zn3ddff 21 %22Test%20Title%22 0 0 0 2
TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.53%22 FALSE 0 FALSE None 9e63d8f3d87be0ed4cc3fab3f750a4429997bead 31 %22Test%20Title%22 0 6 4 1
TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.60%22 FALSE 0 TRUE "None,None,None" None e867e7cd0e53b58428b23ee346c6fa523756e7d1 21 %22Test%20Title%22 0 0 0 0
1 anon articleid date_time deleted editor editor_id minor namespace revert reverteds revid sha1 text_chars title token_revs tokens_added tokens_removed tokens_window
2 TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.52%22 FALSE 0 FALSE None e867e7cd0e53b58428b23ee346c6fa523756e7d1 21 %22Test%20Title%22 12 4 0 4
3 TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.52%22 FALSE 0 FALSE None cb3aeff37c151ab439ee4a7a76cea85679272d5e 44 %22Test%20Title%22 0 5 0 3
4 TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.52%22 FALSE 0 FALSE None cp0mfp4o90fbpyxooys1rw95zn3ddff 21 %22Test%20Title%22 0 0 0 2
5 TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.53%22 FALSE 0 FALSE None 9e63d8f3d87be0ed4cc3fab3f750a4429997bead 31 %22Test%20Title%22 0 6 4 1
6 TRUE 1 2010-12-13 02:51:55 FALSE %2276.102.106.60%22 FALSE 0 TRUE None,None,None None e867e7cd0e53b58428b23ee346c6fa523756e7d1 21 %22Test%20Title%22 0 0 0 0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

11997
test/dumps/enwiki-test.xml Normal file

File diff suppressed because it is too large Load Diff

117
test/dumps/enwiki-test.xml~ Normal file
View File

@@ -0,0 +1,117 @@
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.10/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/ http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10" xml:lang="en">
<siteinfo>
<sitename>Wikipedia</sitename>
<dbname>enwiki</dbname>
<base>https://en.wikipedia.org/wiki/Main_Page</base>
<generator>MediaWiki 1.31.0-wmf.22</generator>
<case>first-letter</case>
<namespaces>
<namespace key="-2" case="first-letter">Media</namespace>
<namespace key="-1" case="first-letter">Special</namespace>
<namespace key="0" case="first-letter" />
<namespace key="1" case="first-letter">Talk</namespace>
<namespace key="2" case="first-letter">User</namespace>
<namespace key="3" case="first-letter">User talk</namespace>
<namespace key="4" case="first-letter">Wikipedia</namespace>
<namespace key="5" case="first-letter">Wikipedia talk</namespace>
<namespace key="6" case="first-letter">File</namespace>
<namespace key="7" case="first-letter">File talk</namespace>
<namespace key="8" case="first-letter">MediaWiki</namespace>
<namespace key="9" case="first-letter">MediaWiki talk</namespace>
<namespace key="10" case="first-letter">Template</namespace>
<namespace key="11" case="first-letter">Template talk</namespace>
<namespace key="12" case="first-letter">Help</namespace>
<namespace key="13" case="first-letter">Help talk</namespace>
<namespace key="14" case="first-letter">Category</namespace>
<namespace key="15" case="first-letter">Category talk</namespace>
<namespace key="100" case="first-letter">Portal</namespace>
<namespace key="101" case="first-letter">Portal talk</namespace>
<namespace key="108" case="first-letter">Book</namespace>
<namespace key="109" case="first-letter">Book talk</namespace>
<namespace key="118" case="first-letter">Draft</namespace>
<namespace key="119" case="first-letter">Draft talk</namespace>
<namespace key="446" case="first-letter">Education Program</namespace>
<namespace key="447" case="first-letter">Education Program talk</namespace>
<namespace key="710" case="first-letter">TimedText</namespace>
<namespace key="711" case="first-letter">TimedText talk</namespace>
<namespace key="828" case="first-letter">Module</namespace>
<namespace key="829" case="first-letter">Module talk</namespace>
<namespace key="2300" case="first-letter">Gadget</namespace>
<namespace key="2301" case="first-letter">Gadget talk</namespace>
<namespace key="2302" case="case-sensitive">Gadget definition</namespace>
<namespace key="2303" case="case-sensitive">Gadget definition talk</namespace>
</namespaces>
</siteinfo>
<page>
<title>Test Title</title>
<ns>0</ns>
<id>1</id>
<revision>
<timestamp>2010-12-13T02:51:55Z</timestamp>
<contributor>
<ip>76.102.106.52</ip>
</contributor>
<comment>baseline</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text xml:space="preserve">
start with four words
</text>
<sha1>cp0mfp4o90fbpyxooys1rw95zn3ddff</sha1>
</revision>
<revision>
<timestamp>2010-12-13T02:51:55Z</timestamp>
<contributor>
<ip>76.102.106.52</ip>
</contributor>
<comment>baseline</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text xml:space="preserve">
start with four words and then add five more
</text>
<sha1>cp0mfp4o90fbpyxooys1rw95zn3ddff</sha1>
</revision>
<revision>
<timestamp>2010-12-13T02:51:55Z</timestamp>
<contributor>
<ip>76.102.106.52</ip>
</contributor>
<comment>baseline</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text xml:space="preserve">
start with four words
</text>
<sha1>cp0mfp4o90fbpyxooys1rw95zn3ddff</sha1>
</revision>
<revision>
<timestamp>2010-12-13T02:51:55Z</timestamp>
<contributor>
<ip>76.102.106.53</ip>
</contributor>
<comment>baseline</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text xml:space="preserve">
this edit will also be reverted
</text>
<sha1>cp0mfp4o90fbpyxooys1rw95zn3ddff</sha1>
</revision>
<revision>
<timestamp>2010-12-13T02:51:55Z</timestamp>
<contributor>
<ip>76.102.106.60</ip>
</contributor>
<comment>baseline</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text xml:space="preserve">
start with four words
</text>
<sha1>cp0mfp4o90fbpyxooys1rw95zn3ddff</sha1>
</revision>
</page>
</mediawiki>

Binary file not shown.

Binary file not shown.

102
test/dumps/pwr-test.xml Normal file
View File

@@ -0,0 +1,102 @@
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.10/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/ http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10" xml:lang="en">
<siteinfo>
<sitename>Wikipedia</sitename>
<dbname>enwiki</dbname>
<base>https://en.wikipedia.org/wiki/Main_Page</base>
<generator>MediaWiki 1.31.0-wmf.22</generator>
<case>first-letter</case>
<namespaces>
<namespace key="-2" case="first-letter">Media</namespace>
<namespace key="-1" case="first-letter">Special</namespace>
<namespace key="0" case="first-letter" />
<namespace key="1" case="first-letter">Talk</namespace>
<namespace key="2" case="first-letter">User</namespace>
<namespace key="3" case="first-letter">User talk</namespace>
<namespace key="4" case="first-letter">Wikipedia</namespace>
<namespace key="5" case="first-letter">Wikipedia talk</namespace>
<namespace key="6" case="first-letter">File</namespace>
<namespace key="7" case="first-letter">File talk</namespace>
<namespace key="8" case="first-letter">MediaWiki</namespace>
<namespace key="9" case="first-letter">MediaWiki talk</namespace>
<namespace key="10" case="first-letter">Template</namespace>
<namespace key="11" case="first-letter">Template talk</namespace>
<namespace key="12" case="first-letter">Help</namespace>
<namespace key="13" case="first-letter">Help talk</namespace>
<namespace key="14" case="first-letter">Category</namespace>
<namespace key="15" case="first-letter">Category talk</namespace>
<namespace key="100" case="first-letter">Portal</namespace>
<namespace key="101" case="first-letter">Portal talk</namespace>
<namespace key="108" case="first-letter">Book</namespace>
<namespace key="109" case="first-letter">Book talk</namespace>
<namespace key="118" case="first-letter">Draft</namespace>
<namespace key="119" case="first-letter">Draft talk</namespace>
<namespace key="446" case="first-letter">Education Program</namespace>
<namespace key="447" case="first-letter">Education Program talk</namespace>
<namespace key="710" case="first-letter">TimedText</namespace>
<namespace key="711" case="first-letter">TimedText talk</namespace>
<namespace key="828" case="first-letter">Module</namespace>
<namespace key="829" case="first-letter">Module talk</namespace>
<namespace key="2300" case="first-letter">Gadget</namespace>
<namespace key="2301" case="first-letter">Gadget talk</namespace>
<namespace key="2302" case="case-sensitive">Gadget definition</namespace>
<namespace key="2303" case="case-sensitive">Gadget definition talk</namespace>
</namespaces>
</siteinfo>
<page>
<title>Test Title</title>
<ns>0</ns>
<id>1</id>
<revision>
<timestamp>2010-12-13T02:51:55Z</timestamp>
<contributor>
<ip>76.102.106.52</ip>
</contributor>
<comment>baseline</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text xml:space="preserve">start with four words</text>
</revision>
<revision>
<timestamp>2010-12-13T02:51:55Z</timestamp>
<contributor>
<ip>76.102.106.52</ip>
</contributor>
<comment>baseline</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text xml:space="preserve">start with four words and then add five more</text>
</revision>
<revision>
<timestamp>2010-12-13T02:51:55Z</timestamp>
<contributor>
<ip>76.102.106.52</ip>
</contributor>
<comment>baseline</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text xml:space="preserve">start with four words</text>
<sha1>cp0mfp4o90fbpyxooys1rw95zn3ddff</sha1>
</revision>
<revision>
<timestamp>2010-12-13T02:51:55Z</timestamp>
<contributor>
<ip>76.102.106.53</ip>
</contributor>
<comment>baseline</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text xml:space="preserve">this edit will also be reverted</text>
</revision>
<revision>
<timestamp>2010-12-13T02:51:55Z</timestamp>
<contributor>
<ip>76.102.106.60</ip>
</contributor>
<comment>baseline</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text xml:space="preserve">start with four words</text>
</revision>
</page>
</mediawiki>

102
test/dumps/pwr-test.xml~ Normal file
View File

@@ -0,0 +1,102 @@
<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.10/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/ http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10" xml:lang="en">
<siteinfo>
<sitename>Wikipedia</sitename>
<dbname>enwiki</dbname>
<base>https://en.wikipedia.org/wiki/Main_Page</base>
<generator>MediaWiki 1.31.0-wmf.22</generator>
<case>first-letter</case>
<namespaces>
<namespace key="-2" case="first-letter">Media</namespace>
<namespace key="-1" case="first-letter">Special</namespace>
<namespace key="0" case="first-letter" />
<namespace key="1" case="first-letter">Talk</namespace>
<namespace key="2" case="first-letter">User</namespace>
<namespace key="3" case="first-letter">User talk</namespace>
<namespace key="4" case="first-letter">Wikipedia</namespace>
<namespace key="5" case="first-letter">Wikipedia talk</namespace>
<namespace key="6" case="first-letter">File</namespace>
<namespace key="7" case="first-letter">File talk</namespace>
<namespace key="8" case="first-letter">MediaWiki</namespace>
<namespace key="9" case="first-letter">MediaWiki talk</namespace>
<namespace key="10" case="first-letter">Template</namespace>
<namespace key="11" case="first-letter">Template talk</namespace>
<namespace key="12" case="first-letter">Help</namespace>
<namespace key="13" case="first-letter">Help talk</namespace>
<namespace key="14" case="first-letter">Category</namespace>
<namespace key="15" case="first-letter">Category talk</namespace>
<namespace key="100" case="first-letter">Portal</namespace>
<namespace key="101" case="first-letter">Portal talk</namespace>
<namespace key="108" case="first-letter">Book</namespace>
<namespace key="109" case="first-letter">Book talk</namespace>
<namespace key="118" case="first-letter">Draft</namespace>
<namespace key="119" case="first-letter">Draft talk</namespace>
<namespace key="446" case="first-letter">Education Program</namespace>
<namespace key="447" case="first-letter">Education Program talk</namespace>
<namespace key="710" case="first-letter">TimedText</namespace>
<namespace key="711" case="first-letter">TimedText talk</namespace>
<namespace key="828" case="first-letter">Module</namespace>
<namespace key="829" case="first-letter">Module talk</namespace>
<namespace key="2300" case="first-letter">Gadget</namespace>
<namespace key="2301" case="first-letter">Gadget talk</namespace>
<namespace key="2302" case="case-sensitive">Gadget definition</namespace>
<namespace key="2303" case="case-sensitive">Gadget definition talk</namespace>
</namespaces>
</siteinfo>
<page>
<title>Test Title</title>
<ns>0</ns>
<id>1</id>
<revision>
<timestamp>2010-12-13T02:51:55Z</timestamp>
<contributor>
<ip>76.102.106.52</ip>
</contributor>
<comment>baseline</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text xml:space="preserve">start with four words</text>
</revision>
<revision>
<timestamp>2010-12-13T02:51:55Z</timestamp>
<contributor>
<ip>76.102.106.52</ip>
</contributor>
<comment>baseline</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text xml:space="preserve">start with four words and then add five more</text>
</revision>
<revision>
<timestamp>2010-12-13T02:51:55Z</timestamp>
<contributor>
<ip>76.102.106.52</ip>
</contributor>
<comment>baseline</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text xml:space="preserve">start with four words</text>
<sha1>cp0mfp4o90fbpyxooys1rw95zn3ddff</sha1>
</revision>
<revision>
<timestamp>2010-12-13T02:51:55Z</timestamp>
<contributor>
<ip>76.102.106.53</ip>
</contributor>
<comment>baseline</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text xml:space="preserve">this edit will also be reverted</text>
</revision>
<revision>
<timestamp>2010-12-13T02:51:55Z</timestamp>
<contributor>
<ip>76.102.106.60</ip>
</contributor>
<comment>baseline</comment>
<model>wikitext</model>
<format>text/x-wiki</format>
<text xml:space="preserve">start with four words</text>
</revision>
</page>
</mediawiki>