Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a DictConfig from another drops node types #252

Closed
omry opened this issue May 12, 2020 · 0 comments · Fixed by #251
Closed

Creating a DictConfig from another drops node types #252

omry opened this issue May 12, 2020 · 0 comments · Fixed by #251

Comments

@omry
Copy link
Owner

omry commented May 12, 2020

test:

@dataclass
class User:
    name: str
    age: int

cfg1 = OmegaConf.create(module.User(name="James Bond", age=7))
with pytest.raises(ValidationError):
  cfg1.age = "not a number"

cfg2 = OmegaConf.create(cfg1)
with pytest.raises(ValidationError):
  cfg2.age = "not a number"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant