If a country does not sign and ratify a treaty they are not bound by it, they can also unratify it if they grow to dislike it.
"International law" is a very strange and nebulous thing. Much of it grew out of traditions. Like not killing diplomats of hostile countries.