Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8add50b

Browse files
committed
Python3 print()
1 parent b5a8f38 commit 8add50b

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

tests/test_decoding.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,19 @@
1515
requests_cache.install_cache('libvin_tests_cache', expire_after=7*24*60*60)
1616
from libvin.nhtsa import nhtsa_decode
1717

18+
1819
class TestDecode(object):
1920

2021
def test_country(self):
2122
for test in TEST_DATA:
2223
v = Vin(test['VIN'])
23-
print "Testing: %s" % test['VIN']
24+
print("Testing: %s" % test['VIN'])
2425
assert_equals(v.country, test['COUNTRY'])
2526

2627
def test_is_pre_2010(self):
2728
for test in TEST_DATA:
2829
v = Vin(test['VIN'])
29-
print "Testing: %s" % test['VIN']
30+
print("Testing: %s" % test['VIN'])
3031
if test['YEAR'] < 2010:
3132
assert_true(v.is_pre_2010)
3233
else:
@@ -35,13 +36,13 @@ def test_is_pre_2010(self):
3536
def test_less_than_500_per_year(self): # no tests yet..
3637
for test in TEST_DATA:
3738
v = Vin(test['VIN'])
38-
print "Testing: %s" % test['VIN']
39+
print("Testing: %s" % test['VIN'])
3940
assert_equals(v.less_than_500_built_per_year, test['FEWER_THAN_500_PER_YEAR'])
4041

4142
def test_make(self):
4243
for test in TEST_DATA:
4344
v = Vin(test['VIN'])
44-
print "Testing: %s, %s" % (test['VIN'], v.make)
45+
print("Testing: %s, %s" % (test['VIN'], v.make))
4546
assert_equals(v.make, test['MAKE'])
4647
if 'NETWORK_OK' in os.environ:
4748
# Verify that our decoded make is the same as NHTSA's.
@@ -55,41 +56,41 @@ def test_make(self):
5556
def test_region(self):
5657
for test in TEST_DATA:
5758
v = Vin(test['VIN'])
58-
print "Testing: %s" % test['VIN']
59+
print("Testing: %s" % test['VIN'])
5960
assert_equals(v.region, test['REGION'])
6061

6162
def test_vis(self):
6263
for test in TEST_DATA:
6364
v = Vin(test['VIN'])
64-
print "Testing: %s" % test['VIN']
65+
print("Testing: %s" % test['VIN'])
6566
assert_equals(v.vis, test['VIS'])
6667

6768
def test_vds(self):
6869
for test in TEST_DATA:
6970
v = Vin(test['VIN'])
70-
print "Testing: %s" % test['VIN']
71+
print("Testing: %s" % test['VIN'])
7172
assert_equals(v.vds, test['VDS'])
7273

7374
def test_vsn(self):
7475
for test in TEST_DATA:
7576
v = Vin(test['VIN'])
76-
print "Testing: %s" % test['VIN']
77+
print("Testing: %s" % test['VIN'])
7778
assert_equals(v.vsn, test['SEQUENTIAL_NUMBER'])
7879

7980
def test_wmi(self):
8081
for test in TEST_DATA:
8182
v = Vin(test['VIN'])
82-
print "Testing: %s" % test['VIN']
83+
print("Testing: %s" % test['VIN'])
8384
assert_equals(v.wmi, test['WMI'])
8485

8586
def test_year(self):
8687
for test in TEST_DATA:
8788
v = Vin(test['VIN'])
88-
print "Testing: %s - %s" % (test['VIN'], v.year)
89+
print("Testing: %s - %s" % (test['VIN'], v.year))
8990
assert_equals(v.year, test['YEAR'])
9091

9192
def test_is_valid(self):
9293
for test in TEST_DATA:
9394
v = Vin(test['VIN'])
94-
print "Testing: %s" % test['VIN']
95+
print("Testing: %s" % test['VIN'])
9596
assert_equals(v.is_valid, True)

0 commit comments

Comments
 (0)