Open kloczek opened 2 years ago
You didn't say how you got the source code, but judging from the "regex_3" it appears that you got it from the repository. The problem with that is that it contains sources for both Python 2 and Python 3.
I've started from the contents of the source distribution and it works for me on Windows, which is what I use.
Yes I've used git tagged tar ball. Mixinx python 2.x and 3.xx code looks a bit odd especially if fact that python 2.x is now almost 2 years EOSed. I think that it would be better to just tag code tree (or branch it if it still necessary for something) which still supports python 2.x and remove all that code on the master to have clean code on next release?
Just tested 2022.3.2 and looks like issie still is not ressolved.
gentle ping 😋
Just retested 2022.8.17 and looks like issue still is around ..
Only FTR: just tested 2024.4.16 and regex_3/test_regex.py::test_main
still fails.
The root issue here is the test invocation: try one of the following:
python -m pytest -ra -m 'not network' -k 'not test_main'
python -m regex.test_regex
python -m unittest -v regex.test_regex
(only supported option, according to CI config)There is a function in the test module called test_main
, which Pytest thinks is a test to run. Unfortunately, it's not; it's simply the command-line entrypoint function, and it performs command-line argument parsing. This could be fixed by renaming the function to main
.
I'm trying to package your module as an rpm package. So I'm using the typical build, install and test cycle used on building packages from non-root account.
Here is pytest output with one unit failing and some warnings as well: