Comments (6)
Emm.., I think is useless to add the package manager for git extras repo cause the installation is a problem or just waste the time and the information about the test in the readme should be moved to a new file in the test directory, it is special for the dev who want to create some testcases.
from git-extras.
If we use Python, in my opinion Poetry is a very useful tool to make managing things easier. I didn't mention it before because not everyone uses the tool. If you would like to add it, you certainly have my vote!
I'm not convinced that we need testpath
. If we need to mock a command, I think we should do it ourselves. But I'm not the one writing the majority of tests.
I agree with your points that instructions for setting up Python for testing should not be included in the main README.md
.
from git-extras.
Emm.., I think is useless to add the package manager for git extras repo cause the installation is a problem or just waste the time and the information about the test in the readme should be moved to a new file in the test directory, it is special for the dev who want to create some testcases.
Agree with that.
If you would like to add it, you certainly have my vote!
Vote +1 for this too.
from git-extras.
Thanks guys and I will try to restruct the test env for git extras later.
I'm not convinced that we need testpath.
Because of the definition of the git-browse
that it will lead the user to a website which display current repository. Normally, the xdg-open
can help us to do like that, but the xdg-open
is not the part of our functions, we just use it in a special environment, here is linux or unix. I call the part like xdg-open
as external API and the external API should be mocked when do unit tests. So I think we should has a mock library to help us. Mocking system commands is a great way to detach the external API for git-browse
unit test.
from git-extras.
@vanpipy I don't disagree that we need a way to mock commands, and I did mention:
If we need to mock a command, I think we should do it ourselves.
The simple thing we can do is add a directory, tests/bin
to the PATH
only when testing, which contains the mocked commands. I think this approach is more clear and approachable for someone not familiar with the codebase; it's an approach that isn't uncommon and is not coupled to a particular library.
from git-extras.
The simple thing we can do is add a directory, tests/bin to the PATH only when testing, which contains the mocked commands. I think this approach is more clear and approachable for someone not familiar with the codebase; it's an approach that isn't uncommon and is not coupled to a particular library.
I got your idea and it is my fault about the mock commands. Let me take some explains.
- what is the mock commands called and how to be used?
- It is a temp file or process or only a function.
- It can be detected used or not.
- One mocked command works in the python environment.
Once we create the mocking directory and then a python wrapper is needed. It means we need to maintain one more python library. So could the tests/bin
satisfy the requirements above easily? It depends cause I review the implement of the testpath
did lots of thing I cannot understand for now.
I agree and will to do the tests/bin
, but I do not know how many time used. This is why I want to use testpath
.
One more, all things we talked about did not affect the git extras itself. Could i misunderstand a particular library
?
from git-extras.
Related Issues (20)
- Unable to update on Windows HOT 9
- Test(git-authors): add unit test HOT 12
- Create destination folder during `git cp` if it doesn't exist HOT 1
- Allow override temp file location in `git cp` HOT 1
- `find` regex `-iregex '.*\(authors\|contributors\).*'` fails on BSDs
- Time to release 7.1.0 HOT 1
- Refactor(git-authors): support the option `--output` and controlled `--no-email` HOT 1
- Autocompletion after `brew install git-extras` HOT 7
- git standup recursive search fails if -L missing HOT 1
- It's possible to set up autocompletion after brew install git-extras semi-automatically.
- New git-utimes is broken on Mac HOT 1
- Test(git-browse): unit tests
- Update account security
- Test(git-browse-ci): add unit tests
- Test(git-brv): add unit test
- `git delete-merged-branches` can delete default branch such as `master` HOT 10
- Add a flag to "git delete-squashed-branches" to not abort on first error HOT 3
- Time to release 7.2.0 HOT 3
- [question/feature request] verbose repo summary
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 git-extras.