Add tests to ci

Test pyflix and simulation using pytest.
Fix running the sim in non-tty environment.
Test presence of some essential files in the docs.
This commit is contained in:
Oleg Kalachev
2026-08-28 19:29:40 +03:00
parent a77f213538
commit 68eb523beb
5 changed files with 61 additions and 6 deletions
+2 -1
View File
@@ -134,8 +134,9 @@ public:
int available() {
// to implement for Windows, see https://stackoverflow.com/a/71992965/6850197
if (!isatty(STDIN_FILENO)) return 0;
struct pollfd pfd = { .fd = STDIN_FILENO, .events = POLLIN };
return poll(&pfd, 1, 0) > 0;
return poll(&pfd, 1, 0) > 0 && (pfd.revents & POLLIN);
}
int read() {