How can I keep my Mac from restarting? I'm about to download a 1TB collection of files. It'll take about 7 days.

I want to make sure that my computer doesn't shut down or restart while the download is happening.
I found a simple solution that's been working for 6 days. Even when I intentionally try to restart my computer as a test, the computer stays on.

What I did is leave a Word Doc open with random text in it, but I didn't save it.

That shows me an error when my computer tries to restart, but it keeps the system on.