Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.

types : definition : Add validate to definition #357

Merged
merged 10 commits into from
Jan 29, 2020

Conversation

aghinsa
Copy link
Contributor

@aghinsa aghinsa commented Jan 27, 2020

fixes #349

Copy link

@johnandersen777 johnandersen777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet! Can you add some unit tests? One for an input with validation and one without (to make sure it's not changing).

import inspect
import pathlib

import unittest

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accidentally removed these when I went through and removed all unused import. The CI wasn't failing... weird. I figured out what was wrong: #358

If you merge master into this branch we'll be good to go.

Copy link

@johnandersen777 johnandersen777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last thing. Looking great :D Thanks!



class TestDefintion(AsyncTestCase):
async def test_validate(self):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add another test_ where the pie datatype raises a InputValidationError (add this new error class to dffml/exceptions.py).

Use with self.assertRaises(InputValidationError) in the new test to make sure that we catch it.

@aghinsa aghinsa changed the title WIP : types : definition : Add validate to definition types : definition : Add validate to definition Jan 29, 2020
Copy link

@johnandersen777 johnandersen777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SWEET

@johnandersen777 johnandersen777 merged commit 291266c into intel:master Jan 29, 2020
@aghinsa aghinsa deleted the validate branch June 4, 2020 17:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

df: types: Definition validation
2 participants