def test_namespace_collisions(solc5source): # contract collision with pytest.raises(NamespaceCollision): sources.Sources({"foo.sol": solc5source, "bar.sol": solc5source}, {}) # interface collision with pytest.raises(NamespaceCollision): sources.Sources({}, {"foo.sol": solc5source, "bar.sol": solc5source}) # solc / vyper collision with pytest.raises(NamespaceCollision): sources.Sources({"foo.sol": solc5source, "Foo.vy": "@external\ndef bar(): pass"}, {})
def test_contract_interface_collisions(solc5source): # contract / interface collision sources.Sources({"foo.sol": solc5source}, {"bar.sol": solc5source}) sources.Sources({"foo.sol": solc5source}, {"Foo.vy": "@external\ndef bar(): pass"})
def sourceobj(solc5source): yield sources.Sources({"path/to/Foo.sol": solc5source}, {"interfaces/Baz.vy": "@external\ndef bar(): pass"})