Hi
I'm an absolute beginner so please don't kill me if my question is dumb.
I've a new project in Pycharm. The structure is as follows:
project
....tests
........__init__.py
........test_data_reader.py
....data_reader.py
__init__.py is a blank file, data_reader.py reads some csv data and stores ist as: df = pd.read_csv(...).
I tried to set up a unittest file in the tests folder. The file test_data_reader.py contains the following code:
If I run it i get the following message:
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
But shouldn't there be written "Ran 1 tests in 0.000s, OK"?
Does anyone see my error?
Thank you in advance and have a nice day!


I've a new project in Pycharm. The structure is as follows:
project
....tests
........__init__.py
........test_data_reader.py
....data_reader.py
__init__.py is a blank file, data_reader.py reads some csv data and stores ist as: df = pd.read_csv(...).
I tried to set up a unittest file in the tests folder. The file test_data_reader.py contains the following code:
import unittest from data_reader import * class TestDataReader(unittest.TestCase): def test_ncol(self): self.assertEqual(df.shape[1], 4) if __name__ == '__main__': unittest.main()
If I run it i get the following message:
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
But shouldn't there be written "Ran 1 tests in 0.000s, OK"?
Does anyone see my error?
Thank you in advance and have a nice day!
