#20 Add first regex test
Merged 2 years ago by patrikp. Opened 2 years ago by asaleh.
asaleh/mirrors-countme add_linting  into  main

file modified
+1
@@ -1,3 +1,4 @@ 

  flake8

  black

  mypy

+ pytest 

\ No newline at end of file

empty or binary file added
file added
+17
@@ -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",

+         "libdnf",

+         None,

+         "os_name",

+         "os_version",

+         "os_variant",

+         "os_canon",

+         "os_arch",

+     )

file modified
+3 -1
@@ -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

2 years ago