+ 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)
+