It depends on what hypothesis you want to test. More specifically, it usually depends on what kind of parameter on which you'd like to run the test.
For example, you can perform a z-test or t-test for a population mean, even if the population is non-normal, as long as you have a large sample size. (Weiss, Introductory Statistics, Procedure 9.1 and 9.3). You can do the same for a population proportion (Procedure 12.1).
On the other hand, you cannot do the same if you were performing a test on a population standard deviation. For example, Weiss writes regarding the chi-squared test (Procedure 11.1):
Unlike the z-tests and t-tests for one and two population means, the
one-standard-deviation $\chi ^2$-test is not robust to moderate
violations of the normality assumption. In fact, it is so nonrobust
that many statisticians advise against its use unless there is
considerable evidence that the variable under consideration is
normally distributed or very nearly so.
Now, the OP's code shows that the parameter they had in mind was indeed the mean. If the sample size was 8 (as considered at one point), that is not considered to be a "large sample", so hypothesis tests in that case would not be considered valid. But if the sample size was 147 (considered at a different point), then that is indeed a large sample, and a z-test or t-test would be considered legitimate. This is of course an effect of the central limit theorem, that the sampling distribution of the sample mean (or proportion) fortunately always becomes a normal curve in the limit at infinite sample size. (The threshold for "large sample" is usually considered to be around 25 or 30.)
In cases of other parameters, then you'll have to commit to carefully reading the prerequisites to whatever hypothesis test procedure you're using, and make sure that you've met them. As noted, some testing procedures are robust to violations of the normal-population assumption, and others are not.