generated from aboutcode-org/skeleton
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Keshav Priyadarshi <[email protected]>
- Loading branch information
1 parent
f06c9af
commit 3c2dd92
Showing
3 changed files
with
35 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# | ||
# Copyright (c) nexB Inc. and others. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
# Visit https://aboutcode.org and https://github.com/nexB/univers for support and download. | ||
|
||
from unittest import TestCase | ||
import semver | ||
|
||
|
||
class TestPythonSemver(TestCase): | ||
def test_semver_hash(self): | ||
# python-semver doesn't consider build while hashing | ||
vers1 = semver.VersionInfo.parse("1.2.3") | ||
vers2 = semver.VersionInfo.parse("1.2.3+1") | ||
assert hash(vers1) == hash(vers2) |