Uploaded image for project: 'ListenBrainz'
  1. ListenBrainz
  2. LB-474

ListenBrainz-Labs: Write tests for stats module

    • Icon: Task Task
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • None
    • None

      Write unit tests for listenbrainz stats module

       _init_.py would be a good start for writing tests.  SparkTestCase can be used as the base class.

      Keep in mind the following:

      • unit tests aim at testing functions independently. So write tests for all functions of the file you are testing.
      • Data used in testing is mostly constant and should be destroyed as the tests end.
      • every run of tests should give the same output.
      • Refer to tests of listenbrainz_spark/utils for better understanding.
      • A little knowledge of pyspark sql maybe required as you write the tests. Refer to the docs.
      • We use pytest for testing. You can refer to the quick guide or the official documentation

       

            sarthak_jain Sarthak Jain
            vansika Vansika Pareek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package