-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8e21da7
commit 43ed3e1
Showing
12 changed files
with
2,285 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# SPDX-FileCopyrightText: 2024-present David Peckham <[email protected]> | ||
# | ||
# SPDX-License-Identifier: MIT | ||
__version__ = "0.4.1" | ||
__version__ = "0.4.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import pytest | ||
from vin import VIN | ||
|
||
|
||
def test_2020_honda_fit() -> None: | ||
v = VIN("3HGGK5H8XLM725852") | ||
assert v.model_year == 2020 | ||
assert v.make == "Honda" | ||
assert v.model == "Fit" | ||
assert v.series == "" | ||
assert v.trim == "EX, EX-L" | ||
assert v.body_class == "Hatchback/Liftback/Notchback" | ||
|
||
|
||
def test_2021_toyota_rav4() -> None: | ||
v = VIN("JTMFB3FV7MD049459") | ||
assert v.model_year == 2021 | ||
assert v.make == "Toyota" | ||
assert v.model == "RAV4 Prime" | ||
assert v.series == "AXAP54L" | ||
assert v.trim == "LE" | ||
assert v.body_class == "Sport Utility Vehicle (SUV)/Multi-Purpose Vehicle (MPV)" | ||
|
||
|
||
@pytest.mark.skip( | ||
"This trim isn't in the February 16, 2024 vPIC snapshot. Check the next snapshot." | ||
) | ||
def test_2024_vw_jetta() -> None: | ||
"""Trim is SE in the vPIC 2024-02-16 snapshot. Check this when vPIC | ||
releases a newer snapshot. | ||
""" | ||
v = VIN("3VW7M7BU2RM018616") | ||
assert v.model_year == 2024 | ||
assert v.make == "Volkswagen" | ||
assert v.model == "Jetta" | ||
assert v.series == "" | ||
assert v.trim == "SE, SE (AQ301 Trans)" | ||
assert v.body_class == "Sedan/Saloon" | ||
|
||
|
||
def test_2021_toyota_highlander() -> None: | ||
v = VIN("5TDHBRCH0MS065999") | ||
assert v.model_year == 2021 | ||
assert v.make == "Toyota" | ||
assert v.model == "Highlander" | ||
assert v.series == "AXUH78L" | ||
assert v.trim == "XLE Nav" | ||
assert v.body_class == "Sport Utility Vehicle (SUV)/Multi-Purpose Vehicle (MPV)" | ||
assert v.electrification_level == "Strong HEV (Hybrid Electric Vehicle)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import parametrize_from_file | ||
import pytest | ||
from vin import VIN | ||
|
||
|
||
@pytest.mark.xfail(reason="NHTSA VIN exceptions aren't supported yet") | ||
@parametrize_from_file | ||
def test_vin_exceptions( | ||
vin: str, | ||
model_year: int, | ||
make: str, | ||
model: str, | ||
series: str, | ||
body_class: str, | ||
electrification_level: str, | ||
) -> None: | ||
v = VIN(vin) | ||
assert v.model_year == model_year | ||
assert v.make == make | ||
assert v.model == model | ||
assert v.series == series | ||
assert v.body_class == body_class | ||
assert v.electrification_level == electrification_level |
Oops, something went wrong.