Github user imatiach-msft commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20168#discussion_r160255996
  
    --- Diff: python/pyspark/ml/tests.py ---
    @@ -1843,6 +1844,28 @@ def tearDown(self):
     
     class ImageReaderTest(SparkSessionTestCase):
     
    +    def test_ocv_types(self):
    +        ocvList = ImageSchema.ocvTypes
    +        self.assertEqual("Undefined", ocvList[0].name)
    +        self.assertEqual(-1, ocvList[0].mode)
    +        self.assertEqual("N/A", ocvList[0].dataType)
    +        for x in ocvList:
    +            self.assertEqual(x, ImageSchema.ocvTypeByName(x.name))
    +            self.assertEqual(x, ImageSchema.ocvTypeByMode(x.mode))
    +
    +    def test_conversions(self):
    +        ary_src = [[[1e7*random.random() for z in range(4)] for y in 
range(10)] for x in range(10)]
    --- End diff --
    
    can you pass a seed to the random generator (I believe the policy for spark 
is to always generate the same random numbers in tests in order to reduce flaky 
tests)


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to