Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2020-04-28 11:23:36 +0300
committerJaime van Kessel <nallath@gmail.com>2020-04-28 11:23:36 +0300
commit174b58374aeb6f7d1205d20799c7b1c2a7dfa133 (patch)
tree1c1ab2b84d9a01fdbe2f7d2f5898a02132c403ef /plugins/VersionUpgrade
parentf4f990708fd7b0d2cd4413c741acf6c09a0f9d23 (diff)
Remove unneeded unit tests
The code was moved to uranium, so no need to test them in a plugin. In some cases they were also testing a specific implementation artifact and not actual expected behavior. CURA-7388
Diffstat (limited to 'plugins/VersionUpgrade')
-rw-r--r--plugins/VersionUpgrade/VersionUpgrade25to26/tests/TestVersionUpgrade25to26.py68
-rw-r--r--plugins/VersionUpgrade/VersionUpgrade26to27/tests/TestVersionUpgrade26to27.py72
2 files changed, 0 insertions, 140 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade25to26/tests/TestVersionUpgrade25to26.py b/plugins/VersionUpgrade/VersionUpgrade25to26/tests/TestVersionUpgrade25to26.py
index 45cdaebe87..0c5b983b14 100644
--- a/plugins/VersionUpgrade/VersionUpgrade25to26/tests/TestVersionUpgrade25to26.py
+++ b/plugins/VersionUpgrade/VersionUpgrade25to26/tests/TestVersionUpgrade25to26.py
@@ -63,74 +63,6 @@ setting_version = -3
}
]
-## Tests the technique that gets the version number from CFG files.
-#
-# \param data The parametrised data to test with. It contains a test name
-# to debug with, the serialised contents of a CFG file and the correct
-# version number in that CFG file.
-# \param upgrader The instance of the upgrade class to test.
-@pytest.mark.parametrize("data", test_cfg_version_good_data)
-def test_cfgVersionGood(data, upgrader):
- version = upgrader.getCfgVersion(data["file_data"])
- assert version == data["version"]
-
-test_cfg_version_bad_data = [
- {
- "test_name": "Empty",
- "file_data": "",
- "exception": configparser.Error #Explicitly not specified further which specific error we're getting, because that depends on the implementation of configparser.
- },
- {
- "test_name": "No General",
- "file_data": """[values]
-layer_height = 0.1337
-""",
- "exception": configparser.Error
- },
- {
- "test_name": "No Version",
- "file_data": """[general]
-true = false
-""",
- "exception": configparser.Error
- },
- {
- "test_name": "Not a Number",
- "file_data": """[general]
-version = not-a-text-version-number
-""",
- "exception": ValueError
- },
- {
- "test_name": "Setting Value NaN",
- "file_data": """[general]
-version = 4
-[metadata]
-setting_version = latest_or_something
-""",
- "exception": ValueError
- },
- {
- "test_name": "Major-Minor",
- "file_data": """[general]
-version = 1.2
-""",
- "exception": ValueError
- }
-]
-
-## Tests whether getting a version number from bad CFG files gives an
-# exception.
-#
-# \param data The parametrised data to test with. It contains a test name
-# to debug with, the serialised contents of a CFG file and the class of
-# exception it needs to throw.
-# \param upgrader The instance of the upgrader to test.
-@pytest.mark.parametrize("data", test_cfg_version_bad_data)
-def test_cfgVersionBad(data, upgrader):
- with pytest.raises(data["exception"]):
- upgrader.getCfgVersion(data["file_data"])
-
test_upgrade_preferences_removed_settings_data = [
{
"test_name": "Removed Setting",
diff --git a/plugins/VersionUpgrade/VersionUpgrade26to27/tests/TestVersionUpgrade26to27.py b/plugins/VersionUpgrade/VersionUpgrade26to27/tests/TestVersionUpgrade26to27.py
index 6235578238..1465df01e7 100644
--- a/plugins/VersionUpgrade/VersionUpgrade26to27/tests/TestVersionUpgrade26to27.py
+++ b/plugins/VersionUpgrade/VersionUpgrade26to27/tests/TestVersionUpgrade26to27.py
@@ -36,13 +36,6 @@ infill_sparse_density = 42
"version": 3000000
},
{
- "test_name": "Negative Version", #Why not?
- "file_data": """[general]
-version = -20
-""",
- "version": -20000000
- },
- {
"test_name": "Setting Version",
"file_data": """[general]
version = 1
@@ -50,15 +43,6 @@ version = 1
setting_version = 1
""",
"version": 1000001
- },
- {
- "test_name": "Negative Setting Version",
- "file_data": """[general]
-version = 1
-[metadata]
-setting_version = -3
-""",
- "version": 999997
}
]
@@ -73,62 +57,6 @@ def test_cfgVersionGood(data, upgrader):
version = upgrader.getCfgVersion(data["file_data"])
assert version == data["version"]
-test_cfg_version_bad_data = [
- {
- "test_name": "Empty",
- "file_data": "",
- "exception": configparser.Error #Explicitly not specified further which specific error we're getting, because that depends on the implementation of configparser.
- },
- {
- "test_name": "No General",
- "file_data": """[values]
-layer_height = 0.1337
-""",
- "exception": configparser.Error
- },
- {
- "test_name": "No Version",
- "file_data": """[general]
-true = false
-""",
- "exception": configparser.Error
- },
- {
- "test_name": "Not a Number",
- "file_data": """[general]
-version = not-a-text-version-number
-""",
- "exception": ValueError
- },
- {
- "test_name": "Setting Value NaN",
- "file_data": """[general]
-version = 4
-[metadata]
-setting_version = latest_or_something
-""",
- "exception": ValueError
- },
- {
- "test_name": "Major-Minor",
- "file_data": """[general]
-version = 1.2
-""",
- "exception": ValueError
- }
-]
-
-## Tests whether getting a version number from bad CFG files gives an
-# exception.
-#
-# \param data The parametrised data to test with. It contains a test name
-# to debug with, the serialised contents of a CFG file and the class of
-# exception it needs to throw.
-# \param upgrader The instance of the upgrader to test.
-@pytest.mark.parametrize("data", test_cfg_version_bad_data)
-def test_cfgVersionBad(data, upgrader):
- with pytest.raises(data["exception"]):
- upgrader.getCfgVersion(data["file_data"])
test_upgrade_stacks_with_not_supported_data = [
{