pabloem commented on a change in pull request #16179:
URL: https://github.com/apache/beam/pull/16179#discussion_r767826292
##########
File path: playground/backend/internal/validators/python_validators.go
##########
@@ -15,8 +15,34 @@
package validators
-// GetPythonValidators return validators methods that should be applied to Go
code
-func GetPythonValidators() *[]Validator {
- //TODO: Will be added in task [BEAM-13292]
- return &[]Validator{}
+import (
+ "beam.apache.org/playground/backend/internal/logger"
+ "io/ioutil"
+ "strings"
+)
+
+const pyUnitTestPattern = "import unittest"
Review comment:
should we file a bug to make sure that this works fine? users may
accidentaly import unittest without adding an actual test? (maybe?) - perhaps
the frontend should show the user that `import unittest` will make the
playground run unit tests.
##########
File path: playground/backend/internal/validators/python_validators.go
##########
@@ -15,8 +15,34 @@
package validators
-// GetPythonValidators return validators methods that should be applied to Go
code
-func GetPythonValidators() *[]Validator {
- //TODO: Will be added in task [BEAM-13292]
- return &[]Validator{}
+import (
+ "beam.apache.org/playground/backend/internal/logger"
+ "io/ioutil"
+ "strings"
+)
+
+const pyUnitTestPattern = "import unittest"
Review comment:
another option is `(unittest.TestCase)` .. though I recognize this is
hard.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]