Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase code coverage of tests #70

Open
7 tasks
marimeireles opened this issue Oct 26, 2020 · 4 comments
Open
7 tasks

Increase code coverage of tests #70

marimeireles opened this issue Oct 26, 2020 · 4 comments

Comments

@marimeireles
Copy link
Member

marimeireles commented Oct 26, 2020

We need more tests, this issue keeps track of tests that should be added:

  • Test SQLite magics
  • tokenization
  • Test LOAD
  • Test CREATE
  • Test DELETE
  • Test XVEGA various inputs magic
  • tokenization

These are the more latent ones. We can expand on this. The more the better :)

@marimeireles
Copy link
Member Author

To create better tests that actually run a notebook and produce a real output we can use: https://github.com/jupyter/jupyter_kernel_test
xeus-Cling and xeus-Python also use it, see the CI of cling: https://github.com/jupyter-xeus/xeus-cling/blob/7197375829dbc2848ad2b49bf8ad3ae889edc708/.travis.yml#L48
Checking the /tests/ dir and checking how they're implementing it there will be useful too.

@avinal
Copy link
Contributor

avinal commented Nov 11, 2020

Hey @marimeireles, I set up the test environment but I am confused about how we can test LOAD or anything that doesn't give output. We can rather check for error messages if something is unsuccessful. Or you suggest something :)

@marimeireles
Copy link
Member Author

Hum, yeah.
Most of the commands actually output an err message, like LOAD outputs Error: The path doesn't exist. if you passed the wrong path, we can check for that, if it doesn't appear, we assumed it worked.
Also, if you wanna test it more extensively, for example still in the case of LOAD you can test if the loaded DB is valid by doing a simple SQLite operation on it, if it fails, then it's not, and so on. :)
xeus-SQLite is full of edge cases not covered by the code, unfortunately.

If the other commands like CREATE [...] don't throw an error message, we can create new err msgs for them.

Additionally, if you wanna inspiration on how to start using this python lib: https://github.com/jupyter-xeus/xeus-cling/blob/master/test/test_xcpp_kernel.py

@avinal
Copy link
Contributor

avinal commented Nov 12, 2020

Additionally, if you wanna inspiration on how to start using this python lib: https://github.com/jupyter-xeus/xeus-cling/blob/master/test/test_xcpp_kernel.py

I saw this and tried to replicate but the library is throwing some weird errors, I will try them again and let you know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants