From 6d7ea4b801b7d82459900f6ea1e1ea5b229c60d6 Mon Sep 17 00:00:00 2001 From: Allison Thackston Date: Thu, 13 Aug 2026 09:31:00 -0700 Subject: [PATCH] Remove redundant plugin tests --- tests/test_plugin.py | 11 +---------- tests/test_simple.py | 3 +-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/tests/test_plugin.py b/tests/test_plugin.py index e96358559..cbf56474c 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -51,14 +51,6 @@ def test_default_include_preserves_navigation_files(self): self.assertIn(".pages", plugin.config["include"]) self.assertIn(".nav.yml", plugin.config["include"]) - def test_on_startup_records_dirty_mode(self): - """Test startup passes the dirty-build state to file generation.""" - plugin = self.make_plugin() - - plugin.on_startup(command="serve", dirty=True) - - self.assertTrue(plugin.dirty) - def test_on_config_merges_into_docs_directory(self): """Test the default configuration builds into the docs directory.""" plugin = self.make_plugin() @@ -77,7 +69,6 @@ def test_on_config_merges_into_docs_directory(self): self.assertEqual(docs_dir, plugin.orig_docs_dir) self.assertEqual(docs_dir, plugin.config["build_dir"]) self.assertEqual(docs_dir, config["docs_dir"]) - self.assertIn(".nav.yml", plugin.config["include"]) self.assertIn(docs_dir, plugin.config["ignore_paths"]) self.assertIn(site_dir, plugin.config["ignore_paths"]) self.assertIn("include:", config["mkdocs_simple_config"]) @@ -102,7 +93,7 @@ def test_on_config_uses_temporary_directory_without_merge(self): def test_on_files_replaces_existing_file_with_generated_file(self): """Test generated documentation replaces the original MkDocs file.""" plugin = self.make_plugin() - plugin.dirty = True + plugin.on_startup(command="serve", dirty=True) plugin.last_build_time = 10 temporary_directory = tempfile.TemporaryDirectory() self.addCleanup(temporary_directory.cleanup) diff --git a/tests/test_simple.py b/tests/test_simple.py index 1c029b74b..b790e3b4b 100644 --- a/tests/test_simple.py +++ b/tests/test_simple.py @@ -145,9 +145,8 @@ def test_is_doc_file(self): self.assertTrue(simple_test.is_doc_file(name="helloworld.md")) self.assertFalse(simple_test.is_doc_file(name="md.helloworld")) - simple_test.doc_glob = [".pages", ".nav.yml"] + simple_test.doc_glob = [".pages"] self.assertTrue(simple_test.is_doc_file(name=".pages")) - self.assertTrue(simple_test.is_doc_file(name=".nav.yml")) def test_get_files(self): """Test getting all files."""