Changeset View
Changeset View
Standalone View
Standalone View
qa/rpc-tests/walletbackup.py
Context not available. | |||||
assert_equal(self.nodes[1].getbalance(), balance1) | assert_equal(self.nodes[1].getbalance(), balance1) | ||||
assert_equal(self.nodes[2].getbalance(), balance2) | assert_equal(self.nodes[2].getbalance(), balance2) | ||||
# Backup to source wallet file must fail | |||||
sourcePaths = [ | |||||
tmpdir + "/node0/regtest/wallet.dat", | |||||
tmpdir + "/node0/./regtest/wallet.dat", | |||||
tmpdir + "/node0/regtest/", | |||||
tmpdir + "/node0/regtest"] | |||||
sickpig: this is linux/unix specific, dunno if we are try to run these tests on win on other OS but I… | |||||
tomtomtom7AuthorUnsubmitted Done Inline ActionsForward slash works fine on Windows and is currently used everywhere in rpc-tests. tomtomtom7: Forward slash works fine on Windows and is currently used everywhere in rpc-tests. | |||||
sickpigUnsubmitted Done Inline ActionsDidn't know that / works on Windows. I erroneously extended the fact that command prompt doesn't accept / as path separator to all kind of access. Apparently has been accepted since MS-DOS DOS 2.0 and up. Guess this is the reason why it is used across all the tests then. sickpig: Didn't know that `/` works on Windows.
I erroneously extended the fact that command prompt… | |||||
schancelUnsubmitted Done Inline ActionsGood call. schancel: Good call. | |||||
for sourcePath in sourcePaths: | |||||
assert_raises_jsonrpc(-4, "backup failed", | |||||
self.nodes[0].backupwallet, sourcePath) | |||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
WalletBackupTest().main() | WalletBackupTest().main() | ||||
Context not available. |
this is linux/unix specific, dunno if we are try to run these tests on win on other OS but I wonder that using os.path.join can make no harm