From 2df0d81d29a79b5a3a2416e98beada61e03277c0 Mon Sep 17 00:00:00 2001
From: "Veronica K. Berglyd Olsen" <1619840+vkbo@users.noreply.github.com>
Date: Sun, 31 Jan 2021 11:59:24 +0100
Subject: [PATCH] Revert "Add timestamp to document meta"
---
nw/core/document.py | 5 +--
sample/content/636b6aa9b697b.nwd | 1 -
tests/lipsum/ToC.txt | 39 ++++++++++---------
tests/lipsum/content/04468803b92e1.nwd | 1 -
tests/lipsum/content/2426c6f0ca922.nwd | 1 -
tests/lipsum/content/441420a886d82.nwd | 1 -
tests/lipsum/content/47666c91c7ccf.nwd | 1 -
tests/lipsum/content/4c4f28287af27.nwd | 1 -
tests/lipsum/content/7a992350f3eb6.nwd | 1 -
tests/lipsum/content/846352075de7d.nwd | 1 -
tests/lipsum/content/88243afbe5ed8.nwd | 1 -
tests/lipsum/content/88d59a277361b.nwd | 1 -
tests/lipsum/content/8c58a65414c23.nwd | 1 -
tests/lipsum/content/db7e733775d4d.nwd | 1 -
tests/lipsum/content/eb103bc70c90c.nwd | 1 -
tests/lipsum/content/f8c0562e50f1b.nwd | 1 -
tests/lipsum/content/f96ec11c6a3da.nwd | 1 -
tests/lipsum/content/fb609cd8319dc.nwd | 1 -
tests/lipsum/nwProject.nwx | 8 ++--
tests/minimal/ToC.txt | 15 +++----
tests/minimal/content/8c659a11cd429.nwd | 1 -
tests/minimal/content/a35baf2e93843.nwd | 1 -
tests/minimal/content/f5ab3e30151e1.nwd | 1 -
tests/minimal/nwProject.nwx | 10 ++---
.../guiEditor_Main_Final_031b4af5197ec.nwd | 1 -
.../guiEditor_Main_Final_0e17daca5f3e1.nwd | 1 -
.../guiEditor_Main_Final_1a6562590ef19.nwd | 1 -
.../guiEditor_Main_Final_41cfc0d1f2d12.nwd | 1 -
tests/reference/guiMerge_73475cb40a568.nwd | 1 -
tests/reference/guiSplit_031b4af5197ec.nwd | 1 -
tests/reference/guiSplit_25fc0e7096fc6.nwd | 1 -
tests/reference/guiSplit_2858dcd1057d3.nwd | 1 -
tests/reference/guiSplit_2fca346db6561.nwd | 1 -
tests/reference/guiSplit_31489056e0916.nwd | 1 -
tests/reference/guiSplit_41cfc0d1f2d12.nwd | 1 -
tests/reference/guiSplit_98010bd9270f9.nwd | 1 -
tests/test_core/test_core_document.py | 6 ---
tests/test_gui/test_gui_doceditor.py | 14 +++----
tests/test_gui/test_gui_mergesplit.py | 20 +++++-----
39 files changed, 53 insertions(+), 95 deletions(-)
diff --git a/nw/core/document.py b/nw/core/document.py
index 42db1603..7e833854 100644
--- a/nw/core/document.py
+++ b/nw/core/document.py
@@ -27,10 +27,8 @@ along with this program. If not, see .
import logging
import os
-from time import time
-
from nw.constants import nwAlert
-from nw.common import isHandle, formatTimeStamp
+from nw.common import isHandle
from nw.constants import nwItemLayout, nwItemClass
logger = logging.getLogger(__name__)
@@ -153,7 +151,6 @@ class NWDoc():
f"%%~name: {self._theItem.itemName}\n"
f"%%~path: {self._theItem.itemParent}/{self._theItem.itemHandle}\n"
f"%%~kind: {self._theItem.itemClass.name}/{self._theItem.itemLayout.name}\n"
- f"%%~time: {formatTimeStamp(time())}\n"
)
try:
diff --git a/sample/content/636b6aa9b697b.nwd b/sample/content/636b6aa9b697b.nwd
index 916d98df..be611dce 100644
--- a/sample/content/636b6aa9b697b.nwd
+++ b/sample/content/636b6aa9b697b.nwd
@@ -1,7 +1,6 @@
%%~name: Making a Scene
%%~path: e7ded148d6e4a/636b6aa9b697b
%%~kind: NOVEL/SCENE
-%%~time: 2021-01-30 18:30:48
### Making a Scene
@pov: Jane
diff --git a/tests/lipsum/ToC.txt b/tests/lipsum/ToC.txt
index 2d477f30..a499c6f8 100644
--- a/tests/lipsum/ToC.txt
+++ b/tests/lipsum/ToC.txt
@@ -1,21 +1,22 @@
-Table of Contents
-=================
+ Table of Contents
+===================
+
+ File Name Class Document Label
+--------------------------------------------------------------------------------
+ content/04468803b92e1.nwd WORLD Ancient Europe
+ content/2426c6f0ca922.nwd PLOT Main
+ content/441420a886d82.nwd NOVEL Chapter Two
+ content/47666c91c7ccf.nwd NOVEL Scene Five
+ content/4c4f28287af27.nwd CHARACTER Mr. Nobody
+ content/7a992350f3eb6.nwd NOVEL Lorem Ipsum
+ content/846352075de7d.nwd NOVEL Interlude
+ content/88243afbe5ed8.nwd NOVEL Scene One
+ content/88d59a277361b.nwd NOVEL Prologue
+ content/8c58a65414c23.nwd NOVEL Front Matter
+ content/db7e733775d4d.nwd NOVEL Act One
+ content/eb103bc70c90c.nwd NOVEL Scene Three
+ content/f8c0562e50f1b.nwd NOVEL Scene Four
+ content/f96ec11c6a3da.nwd NOVEL Scene Two
+ content/fb609cd8319dc.nwd NOVEL Chapter One
-File Name Class Layout Document Label
-----------------------------------------------------------------
-content/7a992350f3eb6.nwd NOVEL TITLE Lorem Ipsum
-content/8c58a65414c23.nwd NOVEL PAGE Front Matter
-content/88d59a277361b.nwd NOVEL UNNUMBERED Prologue
-content/db7e733775d4d.nwd NOVEL PARTITION Act One
-content/fb609cd8319dc.nwd NOVEL CHAPTER Chapter One
-content/88243afbe5ed8.nwd NOVEL SCENE Scene One
-content/f96ec11c6a3da.nwd NOVEL SCENE Scene Two
-content/846352075de7d.nwd NOVEL BOOK Interlude
-content/441420a886d82.nwd NOVEL CHAPTER Chapter Two
-content/eb103bc70c90c.nwd NOVEL SCENE Scene Three
-content/f8c0562e50f1b.nwd NOVEL SCENE Scene Four
-content/47666c91c7ccf.nwd NOVEL SCENE Scene Five
-content/4c4f28287af27.nwd CHARACTER NOTE Mr. Nobody
-content/2426c6f0ca922.nwd PLOT NOTE Main
-content/04468803b92e1.nwd WORLD NOTE Ancient Europe
diff --git a/tests/lipsum/content/04468803b92e1.nwd b/tests/lipsum/content/04468803b92e1.nwd
index 5534a8cd..6d706890 100644
--- a/tests/lipsum/content/04468803b92e1.nwd
+++ b/tests/lipsum/content/04468803b92e1.nwd
@@ -1,7 +1,6 @@
%%~name: Ancient Europe
%%~path: 60bdf227455cc/04468803b92e1
%%~kind: WORLD/NOTE
-%%~time: 2021-01-30 18:55:56
# Ancient Europe
@tag: Europe
diff --git a/tests/lipsum/content/2426c6f0ca922.nwd b/tests/lipsum/content/2426c6f0ca922.nwd
index cc4f8a87..ad926141 100644
--- a/tests/lipsum/content/2426c6f0ca922.nwd
+++ b/tests/lipsum/content/2426c6f0ca922.nwd
@@ -1,7 +1,6 @@
%%~name: Main
%%~path: 6c6afb1247750/2426c6f0ca922
%%~kind: PLOT/NOTE
-%%~time: 2021-01-30 18:55:55
# Main Plot
@tag: Main
diff --git a/tests/lipsum/content/441420a886d82.nwd b/tests/lipsum/content/441420a886d82.nwd
index 904a77f4..26237180 100644
--- a/tests/lipsum/content/441420a886d82.nwd
+++ b/tests/lipsum/content/441420a886d82.nwd
@@ -1,7 +1,6 @@
%%~name: Chapter Two
%%~path: 6bd935d2490cd/441420a886d82
%%~kind: NOVEL/CHAPTER
-%%~time: 2021-01-30 18:55:50
## Chapter Two
@pov: Bod
diff --git a/tests/lipsum/content/47666c91c7ccf.nwd b/tests/lipsum/content/47666c91c7ccf.nwd
index 76204acd..7ea17223 100644
--- a/tests/lipsum/content/47666c91c7ccf.nwd
+++ b/tests/lipsum/content/47666c91c7ccf.nwd
@@ -1,7 +1,6 @@
%%~name: Scene Five
%%~path: 6bd935d2490cd/47666c91c7ccf
%%~kind: NOVEL/SCENE
-%%~time: 2021-01-30 18:55:53
### Scene Five
@pov: Bod
diff --git a/tests/lipsum/content/4c4f28287af27.nwd b/tests/lipsum/content/4c4f28287af27.nwd
index 146e66f0..d845442f 100644
--- a/tests/lipsum/content/4c4f28287af27.nwd
+++ b/tests/lipsum/content/4c4f28287af27.nwd
@@ -1,7 +1,6 @@
%%~name: Mr. Nobody
%%~path: 67a8707f2f249/4c4f28287af27
%%~kind: CHARACTER/NOTE
-%%~time: 2021-01-30 18:55:54
# Nobody Owens
@tag: Bod
diff --git a/tests/lipsum/content/7a992350f3eb6.nwd b/tests/lipsum/content/7a992350f3eb6.nwd
index 30db992a..6982e548 100644
--- a/tests/lipsum/content/7a992350f3eb6.nwd
+++ b/tests/lipsum/content/7a992350f3eb6.nwd
@@ -1,7 +1,6 @@
%%~name: Lorem Ipsum
%%~path: b3643d0f92e32/7a992350f3eb6
%%~kind: NOVEL/TITLE
-%%~time: 2021-01-30 18:56:00
# Lorem Ipsum
**By lipsum.com**
diff --git a/tests/lipsum/content/846352075de7d.nwd b/tests/lipsum/content/846352075de7d.nwd
index b7f9c728..d362ccc6 100644
--- a/tests/lipsum/content/846352075de7d.nwd
+++ b/tests/lipsum/content/846352075de7d.nwd
@@ -1,7 +1,6 @@
%%~name: Interlude
%%~path: b3643d0f92e32/846352075de7d
%%~kind: NOVEL/BOOK
-%%~time: 2021-01-30 18:55:49
## Why do we use it?
% Exctracted from the lipsum.com website.
diff --git a/tests/lipsum/content/88243afbe5ed8.nwd b/tests/lipsum/content/88243afbe5ed8.nwd
index 966d97a4..426ffeba 100644
--- a/tests/lipsum/content/88243afbe5ed8.nwd
+++ b/tests/lipsum/content/88243afbe5ed8.nwd
@@ -1,7 +1,6 @@
%%~name: Scene One
%%~path: 45e6b01ca35c1/88243afbe5ed8
%%~kind: NOVEL/SCENE
-%%~time: 2021-01-30 18:55:47
### Scene One
@pov: Bod
diff --git a/tests/lipsum/content/88d59a277361b.nwd b/tests/lipsum/content/88d59a277361b.nwd
index 458cf36b..4d55bfda 100644
--- a/tests/lipsum/content/88d59a277361b.nwd
+++ b/tests/lipsum/content/88d59a277361b.nwd
@@ -1,7 +1,6 @@
%%~name: Prologue
%%~path: b3643d0f92e32/88d59a277361b
%%~kind: NOVEL/UNNUMBERED
-%%~time: 2021-01-30 18:55:42
## Prologue
% Synopsis:Explanation from the lipsum.com website.
diff --git a/tests/lipsum/content/8c58a65414c23.nwd b/tests/lipsum/content/8c58a65414c23.nwd
index e703e53c..28e54bef 100644
--- a/tests/lipsum/content/8c58a65414c23.nwd
+++ b/tests/lipsum/content/8c58a65414c23.nwd
@@ -1,7 +1,6 @@
%%~name: Front Matter
%%~path: b3643d0f92e32/8c58a65414c23
%%~kind: NOVEL/PAGE
-%%~time: 2021-01-30 18:55:40
% Exctracted from the lipsum.com website.
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of “de Finibus Bonorum et Malorum” (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, “Lorem ipsum dolor sit amet..”, comes from a line in section 1.10.32.
diff --git a/tests/lipsum/content/db7e733775d4d.nwd b/tests/lipsum/content/db7e733775d4d.nwd
index a1d60c9d..d677152f 100644
--- a/tests/lipsum/content/db7e733775d4d.nwd
+++ b/tests/lipsum/content/db7e733775d4d.nwd
@@ -1,7 +1,6 @@
%%~name: Act One
%%~path: b3643d0f92e32/db7e733775d4d
%%~kind: NOVEL/PARTITION
-%%~time: 2021-01-30 18:55:45
# Act One
“Fusce maximus felis libero”
\ No newline at end of file
diff --git a/tests/lipsum/content/eb103bc70c90c.nwd b/tests/lipsum/content/eb103bc70c90c.nwd
index 2db52f1f..65ce7e49 100644
--- a/tests/lipsum/content/eb103bc70c90c.nwd
+++ b/tests/lipsum/content/eb103bc70c90c.nwd
@@ -1,7 +1,6 @@
%%~name: Scene Three
%%~path: 6bd935d2490cd/eb103bc70c90c
%%~kind: NOVEL/SCENE
-%%~time: 2021-01-30 18:55:51
### Scene Three
@pov: Bod
diff --git a/tests/lipsum/content/f8c0562e50f1b.nwd b/tests/lipsum/content/f8c0562e50f1b.nwd
index 3e6ffafd..f8218e1f 100644
--- a/tests/lipsum/content/f8c0562e50f1b.nwd
+++ b/tests/lipsum/content/f8c0562e50f1b.nwd
@@ -1,7 +1,6 @@
%%~name: Scene Four
%%~path: 6bd935d2490cd/f8c0562e50f1b
%%~kind: NOVEL/SCENE
-%%~time: 2021-01-30 18:55:52
### Scene Four
@pov: Bod
diff --git a/tests/lipsum/content/f96ec11c6a3da.nwd b/tests/lipsum/content/f96ec11c6a3da.nwd
index 6f48cd41..60853dc2 100644
--- a/tests/lipsum/content/f96ec11c6a3da.nwd
+++ b/tests/lipsum/content/f96ec11c6a3da.nwd
@@ -1,7 +1,6 @@
%%~name: Scene Two
%%~path: 45e6b01ca35c1/f96ec11c6a3da
%%~kind: NOVEL/SCENE
-%%~time: 2021-01-30 18:55:48
### Scene Two
@pov: Bod
diff --git a/tests/lipsum/content/fb609cd8319dc.nwd b/tests/lipsum/content/fb609cd8319dc.nwd
index a52f2e4b..ff48ad12 100644
--- a/tests/lipsum/content/fb609cd8319dc.nwd
+++ b/tests/lipsum/content/fb609cd8319dc.nwd
@@ -1,7 +1,6 @@
%%~name: Chapter One
%%~path: 45e6b01ca35c1/fb609cd8319dc
%%~kind: NOVEL/CHAPTER
-%%~time: 2021-01-30 18:55:46
## Chapter One
@pov: Bod
diff --git a/tests/lipsum/nwProject.nwx b/tests/lipsum/nwProject.nwx
index a4e5bcc2..5dec55bb 100644
--- a/tests/lipsum/nwProject.nwx
+++ b/tests/lipsum/nwProject.nwx
@@ -1,12 +1,12 @@
-
+
Lorem Ipsum
Lorem Ipsum
lipsum.com
- 12
- 23
- 1650
+ 10
+ 22
+ 1571
False
diff --git a/tests/minimal/ToC.txt b/tests/minimal/ToC.txt
index a41be0bf..f5b94b72 100644
--- a/tests/minimal/ToC.txt
+++ b/tests/minimal/ToC.txt
@@ -1,9 +1,10 @@
-Table of Contents
-=================
+ Table of Contents
+===================
+
+ File Name Class Document Label
+--------------------------------------------------------------------------------
+ content/8c659a11cd429.nwd NOVEL New Scene
+ content/a35baf2e93843.nwd NOVEL Title Page
+ content/f5ab3e30151e1.nwd NOVEL New Chapter
-File Name Class Layout Document Label
--------------------------------------------------------------
-content/a35baf2e93843.nwd NOVEL TITLE Title Page
-content/f5ab3e30151e1.nwd NOVEL CHAPTER New Chapter
-content/8c659a11cd429.nwd NOVEL SCENE New Scene
diff --git a/tests/minimal/content/8c659a11cd429.nwd b/tests/minimal/content/8c659a11cd429.nwd
index 1607c667..bdb8079f 100644
--- a/tests/minimal/content/8c659a11cd429.nwd
+++ b/tests/minimal/content/8c659a11cd429.nwd
@@ -1,6 +1,5 @@
%%~name: New Scene
%%~path: a6d311a93600a/8c659a11cd429
%%~kind: NOVEL/SCENE
-%%~time: 2021-01-30 18:56:20
### New Scene
diff --git a/tests/minimal/content/a35baf2e93843.nwd b/tests/minimal/content/a35baf2e93843.nwd
index 8b9b738b..a1120152 100644
--- a/tests/minimal/content/a35baf2e93843.nwd
+++ b/tests/minimal/content/a35baf2e93843.nwd
@@ -1,7 +1,6 @@
%%~name: Title Page
%%~path: a508bb932959c/a35baf2e93843
%%~kind: NOVEL/TITLE
-%%~time: 2021-01-30 18:56:17
# Minimal
By Jane Doe, John Doh
diff --git a/tests/minimal/content/f5ab3e30151e1.nwd b/tests/minimal/content/f5ab3e30151e1.nwd
index 5a8659be..f08335a0 100644
--- a/tests/minimal/content/f5ab3e30151e1.nwd
+++ b/tests/minimal/content/f5ab3e30151e1.nwd
@@ -1,6 +1,5 @@
%%~name: New Chapter
%%~path: a6d311a93600a/f5ab3e30151e1
%%~kind: NOVEL/CHAPTER
-%%~time: 2021-01-30 18:56:19
## New Chapter
diff --git a/tests/minimal/nwProject.nwx b/tests/minimal/nwProject.nwx
index c7bc1f3f..d45f9bfa 100644
--- a/tests/minimal/nwProject.nwx
+++ b/tests/minimal/nwProject.nwx
@@ -1,13 +1,13 @@
-
+
Test Minimal
Minimal
Jane Doe
John Doh
- 4
- 2
- 83
+ 3
+ 1
+ 33
True
@@ -65,7 +65,7 @@
FOLDER
NOVEL
New
- True
+ False
-
New Chapter
diff --git a/tests/reference/guiEditor_Main_Final_031b4af5197ec.nwd b/tests/reference/guiEditor_Main_Final_031b4af5197ec.nwd
index 74cf27b3..acb36501 100644
--- a/tests/reference/guiEditor_Main_Final_031b4af5197ec.nwd
+++ b/tests/reference/guiEditor_Main_Final_031b4af5197ec.nwd
@@ -1,7 +1,6 @@
%%~name: New File
%%~path: 44cb730c42048/031b4af5197ec
%%~kind: PLOT/NOTE
-%%~time: 2021-01-30 18:49:59
# Main Plot
@tag: MainPlot
diff --git a/tests/reference/guiEditor_Main_Final_0e17daca5f3e1.nwd b/tests/reference/guiEditor_Main_Final_0e17daca5f3e1.nwd
index ef7ba417..c77c3cd6 100644
--- a/tests/reference/guiEditor_Main_Final_0e17daca5f3e1.nwd
+++ b/tests/reference/guiEditor_Main_Final_0e17daca5f3e1.nwd
@@ -1,7 +1,6 @@
%%~name: New Scene
%%~path: 31489056e0916/0e17daca5f3e1
%%~kind: NOVEL/BOOK
-%%~time: 2021-01-30 18:51:35
# Novel
## Chapter
diff --git a/tests/reference/guiEditor_Main_Final_1a6562590ef19.nwd b/tests/reference/guiEditor_Main_Final_1a6562590ef19.nwd
index 7199f069..9a3ca0a9 100644
--- a/tests/reference/guiEditor_Main_Final_1a6562590ef19.nwd
+++ b/tests/reference/guiEditor_Main_Final_1a6562590ef19.nwd
@@ -1,7 +1,6 @@
%%~name: New File
%%~path: 71ee45a3c0db9/1a6562590ef19
%%~kind: CHARACTER/NOTE
-%%~time: 2021-01-30 18:51:04
# Jane Doe
@tag: Jane
diff --git a/tests/reference/guiEditor_Main_Final_41cfc0d1f2d12.nwd b/tests/reference/guiEditor_Main_Final_41cfc0d1f2d12.nwd
index d67575a5..8e8cb037 100644
--- a/tests/reference/guiEditor_Main_Final_41cfc0d1f2d12.nwd
+++ b/tests/reference/guiEditor_Main_Final_41cfc0d1f2d12.nwd
@@ -1,7 +1,6 @@
%%~name: New File
%%~path: 811786ad1ae74/41cfc0d1f2d12
%%~kind: WORLD/NOTE
-%%~time: 2021-01-30 18:51:53
# Main Location
@tag: Home
diff --git a/tests/reference/guiMerge_73475cb40a568.nwd b/tests/reference/guiMerge_73475cb40a568.nwd
index 38a094d6..5a903143 100644
--- a/tests/reference/guiMerge_73475cb40a568.nwd
+++ b/tests/reference/guiMerge_73475cb40a568.nwd
@@ -1,7 +1,6 @@
%%~name: Chapter One
%%~path: b3643d0f92e32/73475cb40a568
%%~kind: NOVEL/SCENE
-%%~time: 2021-01-30 18:39:07
## Chapter One
@pov: Bod
diff --git a/tests/reference/guiSplit_031b4af5197ec.nwd b/tests/reference/guiSplit_031b4af5197ec.nwd
index bd819978..cbaf3205 100644
--- a/tests/reference/guiSplit_031b4af5197ec.nwd
+++ b/tests/reference/guiSplit_031b4af5197ec.nwd
@@ -1,7 +1,6 @@
%%~name: Scene One
%%~path: 0e17daca5f3e1/031b4af5197ec
%%~kind: NOVEL/SCENE
-%%~time: 2021-01-30 18:42:30
### Scene One
@pov: Bod
diff --git a/tests/reference/guiSplit_25fc0e7096fc6.nwd b/tests/reference/guiSplit_25fc0e7096fc6.nwd
index e6d495ea..3247412b 100644
--- a/tests/reference/guiSplit_25fc0e7096fc6.nwd
+++ b/tests/reference/guiSplit_25fc0e7096fc6.nwd
@@ -1,7 +1,6 @@
%%~name: Chapter One
%%~path: 811786ad1ae74/25fc0e7096fc6
%%~kind: NOVEL/CHAPTER
-%%~time: 2021-01-30 18:40:32
## Chapter One
@pov: Bod
diff --git a/tests/reference/guiSplit_2858dcd1057d3.nwd b/tests/reference/guiSplit_2858dcd1057d3.nwd
index 64292037..c1e79bdf 100644
--- a/tests/reference/guiSplit_2858dcd1057d3.nwd
+++ b/tests/reference/guiSplit_2858dcd1057d3.nwd
@@ -1,7 +1,6 @@
%%~name: Scene Two
%%~path: 0e17daca5f3e1/2858dcd1057d3
%%~kind: NOVEL/SCENE
-%%~time: 2021-01-30 18:43:17
### Scene Two
@pov: Bod
diff --git a/tests/reference/guiSplit_2fca346db6561.nwd b/tests/reference/guiSplit_2fca346db6561.nwd
index f818dc02..c33e7901 100644
--- a/tests/reference/guiSplit_2fca346db6561.nwd
+++ b/tests/reference/guiSplit_2fca346db6561.nwd
@@ -1,7 +1,6 @@
%%~name: Scene Two, Section Two
%%~path: 0e17daca5f3e1/2fca346db6561
%%~kind: NOVEL/SCENE
-%%~time: 2021-01-30 18:43:30
#### Scene Two, Section Two
Suspendisse potenti. Fusce tempus lorem nec laoreet suscipit. Fusce vulputate nisl ac diam tincidunt, nec malesuada quam pellentesque. Maecenas congue, tellus quis commodo rutrum, magna leo egestas arcu, quis suscipit ex risus id ligula. Suspendisse potenti. Morbi blandit lacus vitae laoreet vulputate. Donec vitae tellus eleifend, lobortis eros eu, tincidunt enim. Nullam et ullamcorper nisi. Vivamus tellus ex, lobortis quis rutrum ut, dapibus sit amet turpis. Phasellus pellentesque metus diam, commodo tristique ante commodo ac. Ut mollis ipsum nec diam blandit sollicitudin. Duis bibendum lacus nec commodo dapibus. Sed condimentum luctus ante, id ultricies urna varius nec. Nam convallis magna nec bibendum ultrices. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed auctor pharetra quam, vitae porta ex bibendum eu.
diff --git a/tests/reference/guiSplit_31489056e0916.nwd b/tests/reference/guiSplit_31489056e0916.nwd
index 9d770c6c..e494f6b9 100644
--- a/tests/reference/guiSplit_31489056e0916.nwd
+++ b/tests/reference/guiSplit_31489056e0916.nwd
@@ -1,7 +1,6 @@
%%~name: Scene One
%%~path: 811786ad1ae74/31489056e0916
%%~kind: NOVEL/SCENE
-%%~time: 2021-01-30 18:41:22
### Scene One
@pov: Bod
diff --git a/tests/reference/guiSplit_41cfc0d1f2d12.nwd b/tests/reference/guiSplit_41cfc0d1f2d12.nwd
index 1c91f150..6f887f44 100644
--- a/tests/reference/guiSplit_41cfc0d1f2d12.nwd
+++ b/tests/reference/guiSplit_41cfc0d1f2d12.nwd
@@ -1,7 +1,6 @@
%%~name: Scene One, Section Two
%%~path: 0e17daca5f3e1/41cfc0d1f2d12
%%~kind: NOVEL/SCENE
-%%~time: 2021-01-30 18:43:04
#### Scene One, Section Two
Integer vel libero ipsum. Donec varius aliquam libero, sit amet commodo urna hendrerit non. Nullam quis erat mollis nunc viverra volutpat tincidunt in odio. Nam vitae quam sem. Aliquam suscipit nulla non lorem pharetra semper. Ut suscipit erat eu ligula accumsan ultrices. Phasellus nisl tellus, placerat sed laoreet id, consectetur nec dolor. Sed fringilla ipsum id dapibus posuere. Aenean finibus pharetra tincidunt. Ut molestie malesuada nulla, id posuere lorem tincidunt eu. Aliquam tempor eros a est vulputate, scelerisque pulvinar ipsum fermentum. In hac habitasse platea dictumst.
diff --git a/tests/reference/guiSplit_98010bd9270f9.nwd b/tests/reference/guiSplit_98010bd9270f9.nwd
index 451a4bb5..0725f6a5 100644
--- a/tests/reference/guiSplit_98010bd9270f9.nwd
+++ b/tests/reference/guiSplit_98010bd9270f9.nwd
@@ -1,7 +1,6 @@
%%~name: Scene Two
%%~path: 811786ad1ae74/98010bd9270f9
%%~kind: NOVEL/SCENE
-%%~time: 2021-01-30 18:41:48
### Scene Two
@pov: Bod
diff --git a/tests/test_core/test_core_document.py b/tests/test_core/test_core_document.py
index a84e6972..bbfe658b 100644
--- a/tests/test_core/test_core_document.py
+++ b/tests/test_core/test_core_document.py
@@ -28,7 +28,6 @@ from dummy import causeOSError
from nw.core import NWProject, NWDoc
from nw.core.item import NWItem
from nw.constants import nwItemClass, nwItemLayout
-from nw.common import formatTimeStamp
@pytest.mark.core
def testCoreDocument_LoadSave(monkeypatch, dummyGUI, nwMinimal):
@@ -75,7 +74,6 @@ def testCoreDocument_LoadSave(monkeypatch, dummyGUI, nwMinimal):
assert theDoc.saveDocument(theText)
# Save again to ensure temp file and previous file is handled
- monkeypatch.setattr("nw.core.document.time", lambda: 123.4)
assert theDoc.saveDocument(theText)
# Check file content
@@ -85,11 +83,9 @@ def testCoreDocument_LoadSave(monkeypatch, dummyGUI, nwMinimal):
"%%~name: New File\n"
f"%%~path: a508bb932959c/{xHandle}\n"
"%%~kind: NOVEL/SCENE\n"
- f"%%~time: {formatTimeStamp(123.4)}\n"
"### Test File\n\n"
"Text ...\n\n"
)
- monkeypatch.undo()
# Force no meta data
theDoc._theItem = None
@@ -151,14 +147,12 @@ def testCoreDocument_Methods(monkeypatch, dummyGUI, nwMinimal):
assert theLayout == nwItemLayout.SCENE
# Add meta data garbage
- monkeypatch.setattr("nw.core.document.time", lambda: 123.4)
assert theDoc.saveDocument("%%~ stuff\n### Test File\n\nText ...\n\n")
with open(docPath, mode="r", encoding="utf8") as inFile:
assert inFile.read() == (
"%%~name: New Scene\n"
f"%%~path: a6d311a93600a/{sHandle}\n"
"%%~kind: NOVEL/SCENE\n"
- f"%%~time: {formatTimeStamp(123.4)}\n"
"%%~ stuff\n"
"### Test File\n\n"
"Text ...\n\n"
diff --git a/tests/test_gui/test_gui_doceditor.py b/tests/test_gui/test_gui_doceditor.py
index 94931ce5..6d0034c7 100644
--- a/tests/test_gui/test_gui_doceditor.py
+++ b/tests/test_gui/test_gui_doceditor.py
@@ -28,9 +28,8 @@ from tools import cmpFiles
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QTextCursor
-from PyQt5.QtWidgets import QAction, QMessageBox, QDialog
+from PyQt5.QtWidgets import QAction, QMessageBox
-from nw.gui.itemeditor import GuiItemEditor
from nw.constants import nwItemType, nwDocAction
keyDelay = 2
@@ -43,9 +42,6 @@ def testGuiEditor_Main(qtbot, monkeypatch, nwGUI, fncDir, fncProj, refDir, outDi
"""
# Block message box
monkeypatch.setattr(QMessageBox, "question", lambda *args: QMessageBox.Yes)
- monkeypatch.setattr(QMessageBox, "information", lambda *args: QMessageBox.Yes)
- monkeypatch.setattr(GuiItemEditor, "exec_", lambda *args: None)
- monkeypatch.setattr(GuiItemEditor, "result", lambda *args: QDialog.Accepted)
# Create new, save, close project
nwGUI.theProject.projTree.setSeed(42)
@@ -325,25 +321,25 @@ def testGuiEditor_Main(qtbot, monkeypatch, nwGUI, fncDir, fncProj, refDir, outDi
testFile = os.path.join(outDir, "guiEditor_Main_Final_031b4af5197ec.nwd")
compFile = os.path.join(refDir, "guiEditor_Main_Final_031b4af5197ec.nwd")
copyfile(projFile, testFile)
- assert cmpFiles(testFile, compFile, [4])
+ assert cmpFiles(testFile, compFile)
projFile = os.path.join(fncProj, "content", "1a6562590ef19.nwd")
testFile = os.path.join(outDir, "guiEditor_Main_Final_1a6562590ef19.nwd")
compFile = os.path.join(refDir, "guiEditor_Main_Final_1a6562590ef19.nwd")
copyfile(projFile, testFile)
- assert cmpFiles(testFile, compFile, [4])
+ assert cmpFiles(testFile, compFile)
projFile = os.path.join(fncProj, "content", "0e17daca5f3e1.nwd")
testFile = os.path.join(outDir, "guiEditor_Main_Final_0e17daca5f3e1.nwd")
compFile = os.path.join(refDir, "guiEditor_Main_Final_0e17daca5f3e1.nwd")
copyfile(projFile, testFile)
- assert cmpFiles(testFile, compFile, [4])
+ assert cmpFiles(testFile, compFile)
projFile = os.path.join(fncProj, "content", "41cfc0d1f2d12.nwd")
testFile = os.path.join(outDir, "guiEditor_Main_Final_41cfc0d1f2d12.nwd")
compFile = os.path.join(refDir, "guiEditor_Main_Final_41cfc0d1f2d12.nwd")
copyfile(projFile, testFile)
- assert cmpFiles(testFile, compFile, [4])
+ assert cmpFiles(testFile, compFile)
# qtbot.stopForInteraction()
diff --git a/tests/test_gui/test_gui_mergesplit.py b/tests/test_gui/test_gui_mergesplit.py
index d10c2394..b2d0135e 100644
--- a/tests/test_gui/test_gui_mergesplit.py
+++ b/tests/test_gui/test_gui_mergesplit.py
@@ -66,7 +66,7 @@ def testGuiMergeSplit_Tools(qtbot, monkeypatch, nwGUI, nwLipsum, refDir, outDir)
testFile = os.path.join(outDir, "guiMerge_73475cb40a568.nwd")
compFile = os.path.join(refDir, "guiMerge_73475cb40a568.nwd")
copyfile(projFile, testFile)
- assert cmpFiles(testFile, compFile, [4])
+ assert cmpFiles(testFile, compFile)
# Split By Chapter
assert nwGUI.treeView.setSelectedHandle("73475cb40a568")
@@ -92,7 +92,7 @@ def testGuiMergeSplit_Tools(qtbot, monkeypatch, nwGUI, nwLipsum, refDir, outDir)
testFile = os.path.join(outDir, "guiMerge_71ee45a3c0db9.nwd")
compFile = os.path.join(refDir, "guiMerge_73475cb40a568.nwd")
copyfile(projFile, testFile)
- assert cmpFiles(testFile, compFile, [1, 2, 3, 4])
+ assert cmpFiles(testFile, compFile, [1, 2, 3])
# Split By Scene
assert nwGUI.treeView.setSelectedHandle("73475cb40a568")
@@ -116,19 +116,19 @@ def testGuiMergeSplit_Tools(qtbot, monkeypatch, nwGUI, nwLipsum, refDir, outDir)
testFile = os.path.join(outDir, "guiSplit_25fc0e7096fc6.nwd")
compFile = os.path.join(refDir, "guiSplit_25fc0e7096fc6.nwd")
copyfile(projFile, testFile)
- assert cmpFiles(testFile, compFile, [4])
+ assert cmpFiles(testFile, compFile)
projFile = os.path.join(nwLipsum, "content", "31489056e0916.nwd")
testFile = os.path.join(outDir, "guiSplit_31489056e0916.nwd")
compFile = os.path.join(refDir, "guiSplit_31489056e0916.nwd")
copyfile(projFile, testFile)
- assert cmpFiles(testFile, compFile, [4])
+ assert cmpFiles(testFile, compFile)
projFile = os.path.join(nwLipsum, "content", "98010bd9270f9.nwd")
testFile = os.path.join(outDir, "guiSplit_98010bd9270f9.nwd")
compFile = os.path.join(refDir, "guiSplit_98010bd9270f9.nwd")
copyfile(projFile, testFile)
- assert cmpFiles(testFile, compFile, [4])
+ assert cmpFiles(testFile, compFile)
# Split By Section
assert nwGUI.treeView.setSelectedHandle("73475cb40a568")
@@ -154,31 +154,31 @@ def testGuiMergeSplit_Tools(qtbot, monkeypatch, nwGUI, nwLipsum, refDir, outDir)
testFile = os.path.join(outDir, "guiSplit_1a6562590ef19.nwd")
compFile = os.path.join(refDir, "guiSplit_25fc0e7096fc6.nwd")
copyfile(projFile, testFile)
- assert cmpFiles(testFile, compFile, [1, 2, 3, 4])
+ assert cmpFiles(testFile, compFile, [1, 2, 3])
projFile = os.path.join(nwLipsum, "content", "031b4af5197ec.nwd")
testFile = os.path.join(outDir, "guiSplit_031b4af5197ec.nwd")
compFile = os.path.join(refDir, "guiSplit_031b4af5197ec.nwd")
copyfile(projFile, testFile)
- assert cmpFiles(testFile, compFile, [4])
+ assert cmpFiles(testFile, compFile)
projFile = os.path.join(nwLipsum, "content", "41cfc0d1f2d12.nwd")
testFile = os.path.join(outDir, "guiSplit_41cfc0d1f2d12.nwd")
compFile = os.path.join(refDir, "guiSplit_41cfc0d1f2d12.nwd")
copyfile(projFile, testFile)
- assert cmpFiles(testFile, compFile, [4])
+ assert cmpFiles(testFile, compFile)
projFile = os.path.join(nwLipsum, "content", "2858dcd1057d3.nwd")
testFile = os.path.join(outDir, "guiSplit_2858dcd1057d3.nwd")
compFile = os.path.join(refDir, "guiSplit_2858dcd1057d3.nwd")
copyfile(projFile, testFile)
- assert cmpFiles(testFile, compFile, [4])
+ assert cmpFiles(testFile, compFile)
projFile = os.path.join(nwLipsum, "content", "2fca346db6561.nwd")
testFile = os.path.join(outDir, "guiSplit_2fca346db6561.nwd")
compFile = os.path.join(refDir, "guiSplit_2fca346db6561.nwd")
copyfile(projFile, testFile)
- assert cmpFiles(testFile, compFile, [4])
+ assert cmpFiles(testFile, compFile)
# qtbot.stopForInteraction()