MySQL Forums
Forum List  »  Connector/Python

Re: How to perform unit testing
Posted by: Oscar Pacheco
Date: June 08, 2023 09:01AM

Hello Hao,

You're doing it the right way, but you're missing one flag to indicate you want to use your own server, for that matter you must use `--use-external-server`. For instance:

```
$ python3 unittests.py --use-external-server -H 11.124.45.21 --port=4037 --user=ph
```

When this flag is omitted, it falls back to the default behavior which is bootstrapping a server, and since it seems `/usr/local/mysql` is not reachable in your system, it dumps an error. In case you want to rely on bootstrapping sometime in the future, you need to make sure the folder `mysql` is reachable (you can export the corresponding folder path to be part of the PATH environment variable).

Finally, you can always use `python3 .\unittests.py --help` to get a feeling of the available options.


Regards.

Options: ReplyQuote


Subject
Written By
Posted
June 08, 2023 03:08AM
Re: How to perform unit testing
June 08, 2023 09:01AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.