Skip to content

Commit

Permalink
patch to not delete all docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jwaldrop107 committed Aug 23, 2023
1 parent 0922a54 commit ee3140d
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions tests/python/unit_tests/printing/test_document_modules.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Copyright 2023 NWChemEx-Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Copyright 2023 NWChemEx-Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import unittest
import pluginplay as pp
import os
Expand All @@ -26,7 +26,7 @@ def test_export_printing(self):
current_dir_path = os.getcwd()

# Get the docs directory
docs_dir_path = os.path.abspath(os.path.join(current_dir_path, "../docs"))
docs_dir_path = os.path.abspath(os.path.join(current_dir_path, "../docs/test_document_modules"))


# Empty docs directory
Expand Down Expand Up @@ -65,6 +65,12 @@ def test_export_printing(self):
# Check if index.rst is created
self.assertTrue(len(docs_file_list) == 1)

# Remove test directory when finished
try:
shutil.rmtree(docs_dir_path)
except OSError as e:
print(f"Error: {e}")




Expand Down

0 comments on commit ee3140d

Please sign in to comment.