363aaf3
@@ -1,3 +1,4 @@
flake8
black
mypy
+ pytest
\ No newline at end of file
@@ -0,0 +1,17 @@
+ from countme.regex import COUNTME_USER_AGENT_RE
+
+ def test_useragent_re():
+ groups = COUNTME_USER_AGENT_RE.match(
+ "libdnf (os_name os_version; os_variant; os_canon.os_arch)"
+ ).groups()
+ assert groups == (
+ "libdnf",
+ None,
+ "os_name",
+ "os_version",
+ "os_variant",
+ "os_canon",
+ "os_arch",
+ )
@@ -1,5 +1,5 @@
[tox]
- envlist = lint,format,mypy
+ envlist = lint,format,mypy,py36
[testenv]
basepython = python3.6
@@ -8,6 +8,8 @@
-rtest_requirements.txt
whitelist_externals =
rm
+ commands =
+ python -m pytest
[testenv:lint]
deps =
Added first regex test along with the pytest configuration for tox.
Pull-Request has been merged by patrikp
Added first regex test along with the pytest configuration for tox.