https://github.com/wylee/Dijkstar/blob/master/dijkstar/tests/test_graph.py
Please tell me how to run cls.graph data.
I did, but nothing is displayed.
If possible, a full script would be helpful.Thank you for your cooperation.
test_graph.py
is a unit test module, but python test_graph.py
does nothing because there is no code to execute.Now start the test from the command line.For example, you can test with the following commands:
python-unit test tests/test_graph.py
·Reference Official Document unittest 26.4.2. Command Line Interface
Also, @classmethod
is used, but I don't think this question is very important, so setUpClass()
is the method called before the test runs, and tearDownClass()
is the method called after the test runs.
© 2024 OneMinuteCode. All rights reserved.