# Originally from packaging's test_specifiers.py
[
# Test the equality operation
["2.0", "==2"],
["2.0", "==2.0"],
["2.0", "==2.0.0"],
["2.0+deadbeef", "==2"],
["2.0+deadbeef", "==2.0"],
["2.0+deadbeef", "==2.0.0"],
["2.0+deadbeef", "==2+deadbeef"],
["2.0+deadbeef", "==2.0+deadbeef"],
["2.0+deadbeef", "==2.0.0+deadbeef"],
["2.0+deadbeef.0", "==2.0.0+deadbeef.00"],
# Test the equality operation with a prefix
["2.dev1", "==2.*"],
["2a1", "==2.*"],
["2a1.post1", "==2.*"],
["2b1", "==2.*"],
["2b1.dev1", "==2.*"],
["2c1", "==2.*"],
["2c1.post1.dev1", "==2.*"],
["2rc1", "==2.*"],
["2", "==2.*"],
["2.0", "==2.*"],
["2.0.0", "==2.*"],
["2.0.post1", "==2.0.post1.*"],
["2.0.post1.dev1", "==2.0.post1.*"],
["2.1+local.version", "==2.1.*"],
# Test the in-equality operation
["2.1", "!=2"],
["2.1", "!=2.0"],
["2.0.1", "!=2"],
["2.0.1", "!=2.0"],
["2.0.1", "!=2.0.0"],
["2.0", "!=2.0+deadbeef"],
# Test the in-equality operation with a prefix
["2.0", "!=3.*"],
["2.1", "!=2.0.*"],
# Test the greater than equal operation
["2.0", ">=2"],
["2.0", ">=2.0"],
["2.0", ">=2.0.0"],
["2.0.post1", ">=2"],
["2.0.post1.dev1", ">=2"],
["3", ">=2"],
# Test the less than equal operation
["2.0", "<=2"],
["2.0", "<=2.0"],
["2.0", "<=2.0.0"],
["2.0.dev1", "<=2"],
["2.0a1", "<=2"],
["2.0a1.dev1", "<=2"],
["2.0b1", "<=2"],
["2.0b1.post1", "<=2"],
["2.0c1", "<=2"],
["2.0c1.post1.dev1", "<=2"],
["2.0rc1", "<=2"],
["1", "<=2"],
# Test the greater than operation
["3", ">2"],
["2.1", ">2.0"],
["2.0.1", ">2"],
["2.1.post1", ">2"],
["2.1+local.version", ">2"],
# Test the less than operation
["1", "<2"],
["2.0", "<2.1"],
["2.0.dev0", "<2.1"],
# Test the compatibility operation
["1", "~=1.0"],
["1.0.1", "~=1.0"],
["1.1", "~=1.0"],
["1.9999999", "~=1.0"],
["1.1", "~=1.0a1"],
# Test that epochs are handled sanely
["2!1.0", "~=2!1.0"],
["2!1.0", "==2!1.*"],
["2!1.0", "==2!1.0"],
["2!1.0", "!=1.0"],
["1.0", "!=2!1.0"],
["1.0", "<=2!0.1"],
["2!1.0", ">=2.0"],
["1.0", "<2!0.1"],
["2!1.0", ">2.0"],
# Test some normalization rules
["2.0.5", ">2.0dev"]
]