Comments (10)
Hi, can I take this?
from pywhat.
Hi, can I take this?
Apparently, there is already draft PR: #202
from pywhat.
Right now I'm only working on test_regex_identifier.py
, so if you want you can work on some other files @deepakdinesh1123!
from pywhat.
And while we are discussing tests files, I'm not sure about the usefulness of some tests in
test_click.py
. We do test that all regex work intest_regex_identifier.py
and #202 plans to make it easier which is great. But there is a lot of repetition intest_click.py
, every regex is also tested there. Either as an arg or from the fixture file.
I added some tests myself, as I seemed to be the way it was done but I'm not sure it is useful and pretty sure it could at least be simplified.
Any thoughts? Maybe I'm just missing something.
Originally posted by @PabloLec in #206 (comment)
When #202 gets merged with examples alongside in the database, we could maybe take those, write it to a file and run the file against pyWhat to verify that regex works if match is put in a file? But we also need to test boundaryless, so matches in between of something else..
Originally posted by @amadejpapez in #206 (comment)
from pywhat.
I guess testing boundaryless and every other CLI arguments could still be made in test_click.py
of course. Probably against a permanent fixture file, meaning we would not have to add every example to this fixture file.
Since everything tricky will be tested, we know the parsing part works and we could only test regex one by one with #202 method.
And we could still make a test to just iterate over all regex and respective examples and pass them as args to make sure everything works fine.
from pywhat.
hello
from pywhat.
I'm starting to work on parameterizing test_click.py
now.
And we could still make a test to just iterate over all regex and respective examples and pass them as args to make sure everything works fine.
I could implement this.
from pywhat.
Hey @jyooru, are you still working on click tests?
from pywhat.
Sorry, I forgot about this. I've cleaned up a little bit on my branch refactor/test/click
.
After looking at my changes, I think that passing each regex as args is going to be a better idea than continuing to use a fixture file. This also means that each test could be automatically generated like in #202, instead of using a manually updated list that I implemented on my branch.
I'm happy to implement each regex being passed as args.
from pywhat.
Sorry, I forgot about this. I've cleaned up a little bit on my branch
refactor/test/click
.After looking at my changes, I think that passing each regex as args is going to be a better idea than continuing to use a fixture file. This also means that each test could be automatically generated like in #202, instead of using a manually updated list that I implemented on my branch.
I'm happy to implement each regex being passed as args.
Actually, I am thinking that regex tests should be removed from test_click.py
since we already test regex database. Only CLI related tests should be left.
from pywhat.
Related Issues (20)
- Amazon Web Services EC2 Instance identifier matches incorrectly HOT 2
- IPv6 regex matches on "::" HOT 7
- Make a test that tests whether the names of Regex are capitalised HOT 2
- JSON Web Token (JWT) matches incorrectly HOT 1
- duplicate entries in `regex.json` HOT 3
- CI Checks fail HOT 3
- Add support for list of regex in regex.json HOT 4
- Datadog API Key matches incorrectly
- Discussion about pywhat output order and usability of given matches HOT 3
- [Proposal] Interactive Mode for the user, an interface of the future HOT 1
- [Proposal] parse timestamps HOT 5
- [Proposal] Rarity score from RegEx HOT 2
- Bitcoin Wallet Address matches incorrectly
- Phone Number matches incorrectly HOT 4
- Google API Key
- regex URL does not fully match every URL
- Passed tags are not valid for example invocation from --help string
- Youtube links are not parsed correctly HOT 1
- URL is not parsed with params HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pywhat.