deb_dont_call_py2_in_py3_test
authorDebian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Sun, 17 Jun 2018 16:01:16 +0000 (17:01 +0100)
committerMo Zhou <cdluminate@gmail.com>
Sun, 17 Jun 2018 16:01:16 +0000 (17:01 +0100)
Gbp-Pq: Name deb_dont_call_py2_in_py3_test.patch

pandas/tests/plotting/test_converter.py

index 3818c0464936698a651bdf2a1b9a15ea139dfe80..ec678fda09d9ae9042894e24036b69ef6379582f 100644 (file)
@@ -1,6 +1,7 @@
 import subprocess
 import pytest
 from datetime import datetime, date
+import sys
 
 import numpy as np
 from pandas import Timestamp, Period, Index, date_range, Series
@@ -27,7 +28,7 @@ class TestRegistration(object):
                 "import pandas as pd; "
                 "units = dict(matplotlib.units.registry); "
                 "assert pd.Timestamp in units)'")
-        call = ['python', '-c', code]
+        call = ['python' if sys.version_info[0] == 2 else 'python3', '-c', code]
         assert subprocess.check_call(call) == 0
 
     def test_warns(self):