Closed stianlagstad closed 11 months ago
That functionality is builtin in python, so that should be possible to implement. https://docs.python.org/3/library/glob.html
I wonder if in this case a custom test is not a better option. You can then check if the filepath has a date rather than matching everything.
Thanks for responding. I solved this on my end so that I create the filename "log.txt" (excluding the date) when running tests, and the date-variant otherwise. Please feel free to close this.
Thank you for reporting back!
I have a test like this:
But I want to change how I produce the
logfile.txt
so that the name includes the date, like this:logfile-2023-11-30.txt
. This causes my above assertion to fail, but I'd still like to make this work somehow. I would like to do something like this:Or similar. It would be very useful is some kind of wildcarding would work for path assertions.